All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nosi.core.gui.geographic.MapViewer Maven / Gradle / Ivy

Go to download

IGRP Framework is a powerful and highly customizable platform developed by the Operational Nucleus for the Information Society (NOSi) to create web applications, it provides out of box, several modules to make easy to create stand-alone, production-grade web applications: authentication and access-control, business processes automation, reporting, page builder with automatic code generation and incorporation of the Once-Only-Principle, written in Java. IGRP Framework WAR - Contains some keys resources that give UI to IGRP Framework and others supports files.

There is a newer version: 2.0.0.241121-RCM
Show newest version
package nosi.core.gui.geographic;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;

/**
 * CarlosA.Graca 29/07/2020
 */
public class MapViewer {

	private int zoom;

	private double[] center;

	private boolean fullscreen;

	private JsonObject json = new JsonObject();

	private JsonArray baseMaps = new JsonArray();

	private JsonArray layers = new JsonArray();

	private JsonArray widgets = new JsonArray();

	public void add(String obj, boolean value) {

		this.json.addProperty(obj, value);

	}

	public void add(String obj, String value) {

		this.json.addProperty(obj, value);

	}

	public void add(String obj, JsonArray value) {

		this.json.add(obj, value);

	}

	public JsonArray getWidgets() {
		return widgets;
	}

	public void setWidgets(JsonArray widgets) {
		this.widgets = widgets;
	}

	public void addBaseMap(JsonObject basemap) {

		this.baseMaps.add(basemap);

	}

	public void addLayer(JsonObject layer) {

		this.layers.add(layer);

	}

	public void addWidget(JsonObject widget) {

		this.widgets.add(widget);

	}

	public String toString() {

		this.json.add("baseMaps", this.baseMaps);

		this.json.add("groupLayers", this.layers);

		this.json.add("widgets", this.widgets);

		return this.json.toString();

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy