diff --git a/geoprism-client/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilDTOBase.java b/geoprism-client/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilDTOBase.java
index 436cd224a..41ac834ce 100644
--- a/geoprism-client/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilDTOBase.java
+++ b/geoprism-client/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilDTOBase.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
@com.runwaysdk.business.ClassSignature(hash = -2105263295)
diff --git a/geoprism-client/src/main/java/net/geoprism/InputStreamResponse.java b/geoprism-client/src/main/java/net/geoprism/InputStreamResponse.java
index 549bab247..617cf0392 100644
--- a/geoprism-client/src/main/java/net/geoprism/InputStreamResponse.java
+++ b/geoprism-client/src/main/java/net/geoprism/InputStreamResponse.java
@@ -3,16 +3,18 @@
*
* This file is part of Runway SDK(tm).
*
- * Runway SDK(tm) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * Runway SDK(tm) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License along with Runway SDK(tm). If not, see
- * .
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
*/
package net.geoprism;
diff --git a/geoprism-client/src/main/java/net/geoprism/data/LocationController.java b/geoprism-client/src/main/java/net/geoprism/data/LocationController.java
index 6c43ed6f0..2f3e1de79 100644
--- a/geoprism-client/src/main/java/net/geoprism/data/LocationController.java
+++ b/geoprism-client/src/main/java/net/geoprism/data/LocationController.java
@@ -3,16 +3,18 @@
*
* This file is part of Runway SDK(tm).
*
- * Runway SDK(tm) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * Runway SDK(tm) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License along with Runway SDK(tm). If not, see
- * .
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
*/
package net.geoprism.data;
@@ -20,6 +22,7 @@
import java.util.Arrays;
import java.util.List;
+import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -38,6 +41,7 @@
import com.runwaysdk.system.gis.geo.GeoEntityDTO;
import com.runwaysdk.system.gis.geo.GeoEntityViewDTO;
import com.runwaysdk.system.gis.geo.LocatedInDTO;
+import com.runwaysdk.system.gis.geo.SynonymDTO;
import com.runwaysdk.system.gis.geo.UniversalDTO;
import com.runwaysdk.util.IDGenerator;
@@ -171,6 +175,76 @@ public ResponseIF cancelEditingSession(ClientRequestIF request, @RequestParamter
return new RestBodyResponse("");
}
+ @Endpoint(error = ErrorSerialization.JSON)
+ public ResponseIF viewSynonyms(ClientRequestIF request, @RequestParamter(name = "entityId") String entityId) throws JSONException
+ {
+ GeoEntityDTO entity = GeoEntityDTO.get(request, entityId);
+
+ List extends SynonymDTO> synonyms = entity.getAllSynonym();
+ for (SynonymDTO syn : synonyms)
+ {
+ syn.lock();
+ }
+
+ ListSerializable list = new ListSerializable(synonyms);
+
+ return new RestBodyResponse(list);
+ }
+
+ @Endpoint(error = ErrorSerialization.JSON)
+ public ResponseIF applyEditSynonyms(ClientRequestIF request, @RequestParamter(name = "synonyms") String sjsonSynonyms) throws JSONException
+ {
+ JSONObject jobjSynonyms = new JSONObject(sjsonSynonyms);
+
+ String sParent = jobjSynonyms.getString("parent");
+
+ JSONArray synonyms = jobjSynonyms.getJSONArray("synonyms");
+
+ for (int i = 0; i < synonyms.length(); ++i)
+ {
+ JSONObject synonym = synonyms.getJSONObject(i);
+
+ String id = synonym.getString("id");
+ if (id.length() == 64)
+ {
+ SynonymDTO syn = SynonymDTO.get(request, id);
+ syn.getDisplayLabel().setValue(synonym.getString("displayLabel"));
+ syn.apply();
+ }
+ else
+ {
+ SynonymDTO syn = new SynonymDTO(request);
+ syn.getDisplayLabel().setValue(synonym.getString("displayLabel"));
+
+ SynonymDTO.create(request, syn, sParent);
+ }
+ }
+
+ JSONArray deleted = jobjSynonyms.getJSONArray("deleted");
+
+ for (int i = 0; i < deleted.length(); ++i)
+ {
+ String delId = deleted.getString(i);
+
+ SynonymDTO.get(request, delId).delete();
+ }
+
+ return new RestBodyResponse("");
+ }
+
+ @Endpoint(error = ErrorSerialization.JSON)
+ public ResponseIF cancelEditSynonyms(ClientRequestIF request, @RequestParamter(name = "synonyms") String synonymsJSONArray) throws JSONException
+ {
+ JSONArray synonyms = new JSONArray(synonymsJSONArray);
+
+ for (int i = 0; i < synonyms.length(); ++i)
+ {
+ SynonymDTO.get(request, synonyms.getString(i)).unlock();
+ }
+
+ return new RestBodyResponse("");
+ }
+
@Endpoint(error = ErrorSerialization.JSON)
public ResponseIF edit(ClientRequestIF request, @RequestParamter(name = "entityId") String entityId) throws JSONException
{
diff --git a/geoprism-client/src/main/resources/jawr.properties b/geoprism-client/src/main/resources/jawr.properties
index dad857bcf..b77d0f515 100644
--- a/geoprism-client/src/main/resources/jawr.properties
+++ b/geoprism-client/src/main/resources/jawr.properties
@@ -139,14 +139,14 @@ jawr.js.bundle.dynamic-map.mappings=/3rd-party/jquery-colorpicker/js/colpick.js,
# WebGL Map
jawr.js.bundle.dynamic-map-webgl.id=/bundles/webgl-map.js
#jawr.js.bundle.dynamic-map.mappings=/3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js
-jawr.js.bundle.dynamic-map-webgl.mappings=/3rd-party/mapbox/mapboxgl/mapbox-gl-js-0.29.0/js/mapbox-gl.js, /3rd-party/mapbox/wellknown-5.0/wellknown.js, /3rd-party/mapbox/turf/v_2_0_2/turf.min.js, /3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js, /net/geoprism/widgets/SimpleMapWebGL.js, /net/geoprism/widgets/EditableMapWebGL.js
+jawr.js.bundle.dynamic-map-webgl.mappings=/3rd-party/mapbox/mapboxgl/mapbox-gl-js-0.29.0/js/mapbox-gl.js, /3rd-party/mapbox/wellknown-5.0/wellknown.js, /3rd-party/mapbox/turf/v_2_0_2/turf.min.js, /3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js, /net/geoprism/widgets/SimpleMapWebGL.js, /net/geoprism/widgets/EditableMapWebGL.js, /3rd-party/proj4/proj4.js
# WebGL Map current
jawr.js.bundle.dynamic-map-webgl-current.id=/bundles/webgl-map-current.js
#jawr.js.bundle.dynamic-map.mappings=/3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js
#jawr.js.bundle.dynamic-map-webgl-current.mappings=/3rd-party/mapbox/mapboxgl/mapbox-gl-js-0.32.1/js/mapbox-gl.js, /3rd-party/mapbox/wellknown-5.0/wellknown.js, /3rd-party/mapbox/turf/v_2_0_2/turf.min.js, /3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js, /net/geoprism/widgets/SimpleMapWebGL.js, /net/geoprism/widgets/EditableMapWebGL.js
-jawr.js.bundle.dynamic-map-webgl-current.mappings=/3rd-party/mapbox/mapboxgl/mapbox-gl-js-0.32.1/js/mapbox-gl.js, /3rd-party/mapbox/wellknown-5.0/wellknown.js, /3rd-party/mapbox/turf/v_2_0_2/turf.min.js, /3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js, /net/geoprism/widgets/SimpleMapWebGL.js, /net/geoprism/widgets/EditableMapWebGL.js
+jawr.js.bundle.dynamic-map-webgl-current.mappings=/3rd-party/mapbox/mapboxgl/mapbox-gl-js-0.32.1/js/mapbox-gl.js, /3rd-party/mapbox/wellknown-5.0/wellknown.js, /3rd-party/mapbox/turf/v_2_0_2/turf.min.js, /3rd-party/jquery-colorpicker/js/colpick.js, /net/geoprism/Form.js, /net/geoprism/FeatureForm.js, /net/geoprism/MapFactoryWebGL.js, /net/geoprism/DynamicMap.js, /net/geoprism/widgets/SimpleMapWebGL.js, /net/geoprism/widgets/EditableMapWebGL.js, /3rd-party/proj4/proj4.js
diff --git a/geoprism-common/src/main/java/net/geoprism/JSONStringImpl.java b/geoprism-common/src/main/java/net/geoprism/JSONStringImpl.java
index e0e476b53..961afb6ab 100644
--- a/geoprism-common/src/main/java/net/geoprism/JSONStringImpl.java
+++ b/geoprism-common/src/main/java/net/geoprism/JSONStringImpl.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism;
import org.json.JSONString;
diff --git a/geoprism-server/src/main/domain/(0001485389164474)EditGeometry.xml b/geoprism-server/src/main/domain/(0001485389164474)EditGeometry.xml
index 89e4503e2..120531275 100644
--- a/geoprism-server/src/main/domain/(0001485389164474)EditGeometry.xml
+++ b/geoprism-server/src/main/domain/(0001485389164474)EditGeometry.xml
@@ -1,3 +1,23 @@
+
diff --git a/geoprism-server/src/main/domain/(0001486077826195)GeoEntityUtilUpdate.xml b/geoprism-server/src/main/domain/(0001486077826195)GeoEntityUtilUpdate.xml
index b1167b9f4..c489ee75a 100644
--- a/geoprism-server/src/main/domain/(0001486077826195)GeoEntityUtilUpdate.xml
+++ b/geoprism-server/src/main/domain/(0001486077826195)GeoEntityUtilUpdate.xml
@@ -1,3 +1,23 @@
+
diff --git a/geoprism-server/src/main/domain/(0001489530069436)EditGeometry2.xml b/geoprism-server/src/main/domain/(0001489530069436)EditGeometry2.xml
index 5c4b9df51..dd9894470 100644
--- a/geoprism-server/src/main/domain/(0001489530069436)EditGeometry2.xml
+++ b/geoprism-server/src/main/domain/(0001489530069436)EditGeometry2.xml
@@ -1,3 +1,23 @@
+
diff --git a/geoprism-server/src/main/domain/(0001490294619205)GeoEntityUtilUpdate.xml b/geoprism-server/src/main/domain/(0001490294619205)GeoEntityUtilUpdate.xml
index ee4d17c00..12d58219c 100644
--- a/geoprism-server/src/main/domain/(0001490294619205)GeoEntityUtilUpdate.xml
+++ b/geoprism-server/src/main/domain/(0001490294619205)GeoEntityUtilUpdate.xml
@@ -1,3 +1,23 @@
+
diff --git a/geoprism-server/src/main/domain/(0001490318009735)GeoEntityUtilUpdate.xml b/geoprism-server/src/main/domain/(0001490318009735)GeoEntityUtilUpdate.xml
index 456192194..75446b22c 100644
--- a/geoprism-server/src/main/domain/(0001490318009735)GeoEntityUtilUpdate.xml
+++ b/geoprism-server/src/main/domain/(0001490318009735)GeoEntityUtilUpdate.xml
@@ -1,3 +1,23 @@
+
diff --git a/geoprism-server/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilBase.java b/geoprism-server/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilBase.java
index 3d4279819..c23a0687d 100644
--- a/geoprism-server/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilBase.java
+++ b/geoprism-server/src/main/java-gen/base/net/geoprism/ontology/GeoEntityUtilBase.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
@com.runwaysdk.business.ClassSignature(hash = 1722546625)
diff --git a/geoprism-server/src/main/java-gen/stub/net/geoprism/ontology/GeoEntityUtil.java b/geoprism-server/src/main/java-gen/stub/net/geoprism/ontology/GeoEntityUtil.java
index 9a14737ea..950f9795b 100644
--- a/geoprism-server/src/main/java-gen/stub/net/geoprism/ontology/GeoEntityUtil.java
+++ b/geoprism-server/src/main/java-gen/stub/net/geoprism/ontology/GeoEntityUtil.java
@@ -3,16 +3,18 @@
*
* This file is part of Runway SDK(tm).
*
- * Runway SDK(tm) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * Runway SDK(tm) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License along with Runway SDK(tm). If not, see
- * .
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
*/
package net.geoprism.ontology;
diff --git a/geoprism-server/src/main/java/net/geoprism/DefaultConfiguration.java b/geoprism-server/src/main/java/net/geoprism/DefaultConfiguration.java
index 08dc921e6..6e34595c3 100644
--- a/geoprism-server/src/main/java/net/geoprism/DefaultConfiguration.java
+++ b/geoprism-server/src/main/java/net/geoprism/DefaultConfiguration.java
@@ -3,16 +3,18 @@
*
* This file is part of Runway SDK(tm).
*
- * Runway SDK(tm) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * Runway SDK(tm) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License along with Runway SDK(tm). If not, see
- * .
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
*/
package net.geoprism;
diff --git a/geoprism-server/src/main/java/net/geoprism/data/GeometrySerializationUtil.java b/geoprism-server/src/main/java/net/geoprism/data/GeometrySerializationUtil.java
index 5df9edd4c..9915644c3 100644
--- a/geoprism-server/src/main/java/net/geoprism/data/GeometrySerializationUtil.java
+++ b/geoprism-server/src/main/java/net/geoprism/data/GeometrySerializationUtil.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.data;
import org.json.JSONArray;
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/CompositePublisher.java b/geoprism-server/src/main/java/net/geoprism/ontology/CompositePublisher.java
index d0c819bd9..a2d8fd4fb 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/CompositePublisher.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/CompositePublisher.java
@@ -1,16 +1,44 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
import com.vividsolutions.jts.geom.Envelope;
import com.wdtinc.mapbox_vector_tile.VectorTile;
import com.wdtinc.mapbox_vector_tile.VectorTile.Tile;
+import com.wdtinc.mapbox_vector_tile.VectorTile.Tile.Layer;
public class CompositePublisher
{
- private VectorLayerPublisherIF[] publishers;
+ private List publishers;
public CompositePublisher(VectorLayerPublisherIF... publishers)
{
- this.publishers = publishers;
+ this.publishers = new LinkedList(Arrays.asList(publishers));
+ }
+
+ public void add(VectorLayerPublisherIF publisher)
+ {
+ this.publishers.add(publisher);
}
public byte[] writeVectorTiles(Envelope envelope)
@@ -20,7 +48,12 @@ public byte[] writeVectorTiles(Envelope envelope)
for (VectorLayerPublisherIF publisher : this.publishers)
{
- builder.addLayers(publisher.writeVectorLayer(envelope));
+ List layers = publisher.writeVectorLayers(envelope);
+
+ for (Layer layer : layers)
+ {
+ builder.addLayers(layer);
+ }
}
/// Build MVT
@@ -28,5 +61,4 @@ public byte[] writeVectorTiles(Envelope envelope)
return mvt.toByteArray();
}
-
}
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/LayerPublisher.java b/geoprism-server/src/main/java/net/geoprism/ontology/LayerPublisher.java
index 51a9724b9..0274d3f33 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/LayerPublisher.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/LayerPublisher.java
@@ -3,16 +3,18 @@
*
* This file is part of Runway SDK(tm).
*
- * Runway SDK(tm) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * Runway SDK(tm) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License along with Runway SDK(tm). If not, see
- * .
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
*/
package net.geoprism.ontology;
@@ -24,7 +26,6 @@
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
-import java.util.concurrent.ThreadLocalRandom;
import org.geotools.geojson.geom.GeometryJSON;
import org.json.JSONArray;
@@ -364,8 +365,6 @@ public VectorTile.Tile.Layer writeVectorLayer(String layerName, Envelope envelop
TileGeomResult tileGeom = JtsAdapter.createTileGeom(geometries, envelope, geomFactory, layerParams, acceptAllGeomFilter);
- final VectorTile.Tile.Builder tileBuilder = VectorTile.Tile.newBuilder();
-
// Create MVT layer
final MvtLayerProps layerProps = new MvtLayerProps();
final IUserDataConverter ignoreUserData = new UserDataConverter();
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/LocationContextPublisher.java b/geoprism-server/src/main/java/net/geoprism/ontology/LocationContextPublisher.java
index b1462efd8..d22d968f7 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/LocationContextPublisher.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/LocationContextPublisher.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
import java.io.IOException;
@@ -147,7 +165,6 @@ private void writeGeojson(JSONWriter writer, ValueQuery query) throws IOExceptio
writer.endObject();
}
- @Override
public String getLayerName()
{
return "context";
@@ -160,13 +177,13 @@ private ResultSet getResultSet(String entityId, LayerType type)
sql.append("FROM geo_entity AS ge\n");
sql.append("JOIN geo_entity_display_label AS gdl ON gdl.id = ge.display_label\n");
sql.append("WHERE ge.id = '" + entityId + "'\n");
- sql.append("AND ge.geo_multi_polygon IS NOT NULL\n");
+ sql.append("AND ge.geo_multi_polygon IS NOT NULL\n");
return Database.query(sql.toString());
}
@Override
- public Layer writeVectorLayer(Envelope envelope)
+ public List writeVectorLayers(Envelope envelope)
{
try
{
@@ -176,7 +193,10 @@ public Layer writeVectorLayer(Envelope envelope)
{
String layerName = this.getLayerName();
- return this.writeVectorLayer(layerName, envelope, resultSet);
+ List layers = new LinkedList();
+ layers.add(this.writeVectorLayer(layerName, envelope, resultSet));
+
+ return layers;
}
finally
{
@@ -194,12 +214,16 @@ public byte[] writeVectorTiles(Envelope envelope)
// Add built layer to MVT
final VectorTile.Tile.Builder builder = VectorTile.Tile.newBuilder();
- builder.addLayers(this.writeVectorLayer(envelope));
+ List layers = this.writeVectorLayers(envelope);
+
+ for (Layer layer : layers)
+ {
+ builder.addLayers(layer);
+ }
/// Build MVT
Tile mvt = builder.build();
return mvt.toByteArray();
}
-
}
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/LocationTargetPublisher.java b/geoprism-server/src/main/java/net/geoprism/ontology/LocationTargetPublisher.java
index 8b1113fe8..baec37307 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/LocationTargetPublisher.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/LocationTargetPublisher.java
@@ -3,16 +3,18 @@
*
* This file is part of Runway SDK(tm).
*
- * Runway SDK(tm) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
*
- * Runway SDK(tm) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU Lesser General Public License along with Runway SDK(tm). If not, see
- * .
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
*/
package net.geoprism.ontology;
@@ -178,7 +180,7 @@ private ResultSet getResultSet(String entityId, LayerType type)
sql.append("JOIN geo_entity_display_label AS gdl ON gdl.id = ge.display_label\n");
sql.append("JOIN located_in AS li ON li.child_id = ge.id\n");
sql.append("WHERE li.parent_id = '" + entityId + "'\n");
- sql.append("AND ge.geo_multi_polygon IS NOT NULL\n");
+ sql.append("AND ge.geo_multi_polygon IS NOT NULL\n");
if (this.universalId != null && this.universalId.length() > 0)
{
@@ -188,14 +190,13 @@ private ResultSet getResultSet(String entityId, LayerType type)
return Database.query(sql.toString());
}
- @Override
public String getLayerName()
{
return "target";
}
@Override
- public Layer writeVectorLayer(Envelope envelope)
+ public List writeVectorLayers(Envelope envelope)
{
try
{
@@ -205,7 +206,10 @@ public Layer writeVectorLayer(Envelope envelope)
{
String layerName = this.getLayerName();
- return this.writeVectorLayer(layerName, envelope, resultSet);
+ List layers = new LinkedList();
+ layers.add(this.writeVectorLayer(layerName, envelope, resultSet));
+
+ return layers;
}
finally
{
@@ -223,7 +227,12 @@ public byte[] writeVectorTiles(Envelope envelope)
// Add built layer to MVT
final VectorTile.Tile.Builder builder = VectorTile.Tile.newBuilder();
- builder.addLayers(this.writeVectorLayer(envelope));
+ List layers = this.writeVectorLayers(envelope);
+
+ for (Layer layer : layers)
+ {
+ builder.addLayers(layer);
+ }
/// Build MVT
Tile mvt = builder.build();
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/PublisherUtil.java b/geoprism-server/src/main/java/net/geoprism/ontology/PublisherUtil.java
index 51356cb55..119c6869e 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/PublisherUtil.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/PublisherUtil.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
import org.geotools.geometry.jts.JTS;
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/UserDataConverter.java b/geoprism-server/src/main/java/net/geoprism/ontology/UserDataConverter.java
index 8067c87b9..8cac76078 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/UserDataConverter.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/UserDataConverter.java
@@ -1,3 +1,21 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
import java.util.Map;
diff --git a/geoprism-server/src/main/java/net/geoprism/ontology/VectorLayerPublisherIF.java b/geoprism-server/src/main/java/net/geoprism/ontology/VectorLayerPublisherIF.java
index d2298aa9b..6ea83fd6f 100644
--- a/geoprism-server/src/main/java/net/geoprism/ontology/VectorLayerPublisherIF.java
+++ b/geoprism-server/src/main/java/net/geoprism/ontology/VectorLayerPublisherIF.java
@@ -1,11 +1,29 @@
+/**
+ * Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+ *
+ * This file is part of Runway SDK(tm).
+ *
+ * Runway SDK(tm) is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * Runway SDK(tm) is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Runway SDK(tm). If not, see .
+ */
package net.geoprism.ontology;
+import java.util.List;
+
import com.vividsolutions.jts.geom.Envelope;
import com.wdtinc.mapbox_vector_tile.VectorTile;
public interface VectorLayerPublisherIF
{
- public String getLayerName();
-
- public VectorTile.Tile.Layer writeVectorLayer(Envelope envelope);
+ public List writeVectorLayers(Envelope envelope);
}
diff --git a/geoprism-server/src/main/resources/messages.properties b/geoprism-server/src/main/resources/messages.properties
index 2121a6705..00678c996 100755
--- a/geoprism-server/src/main/resources/messages.properties
+++ b/geoprism-server/src/main/resources/messages.properties
@@ -857,7 +857,6 @@ location.management.all=All
location.management.sublocations=Locations within this area
location.management.autocomplete=Find a location
location.management.newInstance=Add new sub location
-location.management.editTooltip=Create a location
location.management.label=Label
location.management.geoId=Location identifier
location.management.universal=Universal
@@ -865,8 +864,13 @@ location.management.editTooltip=Edit location
location.management.newTooltip=Add a new location
location.management.labelPlaceholder=Name of the location
location.management.geoIdPlaceholder=Unique identifier of the location
-location.management.removeTitle=Delete location
+location.management.removeTooltip=Delete location
location.management.removeConfirm=Are you sure you want to delete the location?
+location.management.synonymModalHeader=Manage synonyms
+location.management.removeSynonymTooltip=Remove synonym
+location.management.synonymLabelPlaceholder=Name of the Synonym
+location.management.createSynonymTooltip=Create synonym
+location.management.synonymsTooltip=Edit synonyms
# Editing tool
location.management.editing.edit=Edit Location Geometries
diff --git a/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/README.txt b/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/README.txt
new file mode 100644
index 000000000..229950fd6
--- /dev/null
+++ b/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/README.txt
@@ -0,0 +1,3 @@
+I copied this from:
+
+https://github.com/aehrc/angular-bootstrap-toggle
\ No newline at end of file
diff --git a/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/angular-bootstrap-toggle.min.css b/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/angular-bootstrap-toggle.min.css
new file mode 100644
index 000000000..7e2622c54
--- /dev/null
+++ b/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/angular-bootstrap-toggle.min.css
@@ -0,0 +1 @@
+.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-20px;margin-right:5px}.toggle{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;position:relative;overflow:hidden}.toggle-group,.toggle-off,.toggle-on{position:absolute;top:0;bottom:0}.toggle-group{width:200%;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none}.toggle.off .toggle-group{left:-100%}.toggle-on{left:0;right:50%;margin:0;border:0;border-radius:0}.toggle-off{left:50%;right:0;margin:0;border:0;border-radius:0}.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px}.toggle.btn{min-width:59px;min-height:34px}.toggle-on.btn{padding-right:24px}.toggle-off.btn{padding-left:24px}.toggle.btn-lg{min-width:79px;min-height:45px}.toggle-on.btn-lg{padding-right:31px}.toggle-off.btn-lg{padding-left:31px}.toggle-handle.btn-lg{width:40px}.toggle.btn-sm{min-width:50px;min-height:30px}.toggle-on.btn-sm{padding-right:20px}.toggle-off.btn-sm{padding-left:20px}.toggle.btn-xs{min-width:35px;min-height:22px}.toggle-on.btn-xs{padding-right:12px}.toggle-off.btn-xs{padding-left:12px}
\ No newline at end of file
diff --git a/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/angular-bootstrap-toggle.min.js b/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/angular-bootstrap-toggle.min.js
new file mode 100644
index 000000000..d708c433f
--- /dev/null
+++ b/geoprism-web/src/main/webapp/3rd-party/angular-bootstrap-toggle/angular-bootstrap-toggle.min.js
@@ -0,0 +1 @@
+!function(){"use strict";var e=["on","off","size","onstyle","offstyle","style","width","height"];angular.module("ui.toggle",[]).value("$toggleSuppressError",!1).constant("toggleConfig",{on:"On",off:"Off",size:"",onstyle:"btn-primary",offstyle:"btn-default",style:""}).controller("ToggleController",["$scope","$attrs","$interpolate","$log","toggleConfig","$toggleSuppressError",function(t,n,l,o,s,a){var i=this,r={$setViewValue:angular.noop};angular.forEach(e,function(e,o){i[e]=angular.isDefined(n[e])?o<8?l(n[e])(t.$parent):t.$parent.$eval(n[e]):s[e]}),this.init=function(e){r=e,i.computeStyle(),r.$render=function(){i.toggle()},r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})},this.computeStyle=function(){var e=i.element.find("label");angular.element(e[0]).html(i.on),angular.element(e[1]).html(i.off);var n=i.element.find("span"),l=Math.max(e[0].offsetWidth,e[1].offsetWidth)+n[0].offsetWidth/2,o=Math.max(e[0].offsetHeight,e[1].offsetHeight),s=i.element.find("div"),a=s[0].offsetWidth,r=s[1].offsetHeight;t.wrapperStyle={},i.width?t.wrapperStyle.width=i.width:a
',scope:{bindModel:"=ngModel"},require:["toggle","ngModel"],controller:"ToggleController",controllerAs:"toggle",compile:function(e,t,n){return{pre:function(e,t,n,l){var o=l[0],s=l[1];o.element=t,o.init(s)},post:function(){}}}}})}();
\ No newline at end of file
diff --git a/geoprism-web/src/main/webapp/3rd-party/proj4/proj4.js b/geoprism-web/src/main/webapp/3rd-party/proj4/proj4.js
new file mode 100644
index 000000000..c02b1efa5
--- /dev/null
+++ b/geoprism-web/src/main/webapp/3rd-party/proj4/proj4.js
@@ -0,0 +1,3 @@
+!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.proj4=b()}(this,function(){"use strict";function a(a,b){if(a[b])return a[b];for(var c,d,e=Object.keys(a),f=b.toLowerCase().replace(Ob,""),g=-1;++g0?90:-90),a.lat_ts=a.lat1)}function i(a){var b=this;if(2===arguments.length){var c=arguments[1];"string"==typeof c?"+"===c.charAt(0)?i[a]=Pb(arguments[1]):i[a]=ac(arguments[1]):i[a]=c}else if(1===arguments.length){if(Array.isArray(a))return a.map(function(a){Array.isArray(a)?i.apply(b,a):i(a)});if("string"==typeof a){if(a in i)return i[a]}else"EPSG"in a?i["EPSG:"+a.EPSG]=a:"ESRI"in a?i["ESRI:"+a.ESRI]=a:"IAU2000"in a?i["IAU2000:"+a.IAU2000]=a:console.log(a);return}}function j(a){return"string"==typeof a}function k(a){return a in i}function l(a){return bc.some(function(b){return a.indexOf(b)>-1})}function m(a){return"+"===a[0]}function n(a){return j(a)?k(a)?i[a]:l(a)?ac(a):m(a)?Pb(a):void 0:a}function o(){var a=this.b/this.a;this.es=1-a*a,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=dc(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function p(a){var b=a.x,c=a.y;if(c*Ib>90&&c*Ib<-90&&b*Ib>180&&b*Ib<-180)return null;var d,e;if(Math.abs(Math.abs(c)-Cb)<=Gb)return null;if(this.sphere)d=this.x0+this.a*this.k0*fc(b-this.long0),e=this.y0+this.a*this.k0*Math.log(Math.tan(Jb+.5*c));else{var f=Math.sin(c),g=gc(this.e,c,f);d=this.x0+this.a*this.k0*fc(b-this.long0),e=this.y0-this.a*this.k0*Math.log(g)}return a.x=d,a.y=e,a}function q(a){var b,c,d=a.x-this.x0,e=a.y-this.y0;if(this.sphere)c=Cb-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var f=Math.exp(-e/(this.a*this.k0));if(c=hc(this.e,f),c===-9999)return null}return b=fc(this.long0+d/(this.a*this.k0)),a.x=b,a.y=c,a}function r(){}function s(a){return a}function t(a,b){var c=oc.length;return a.names?(oc[c]=a,a.names.forEach(function(a){nc[a.toLowerCase()]=c}),this):(console.log(b),!0)}function u(a){if(!a)return!1;var b=a.toLowerCase();return"undefined"!=typeof nc[b]&&oc[nc[b]]?oc[nc[b]]:void 0}function v(){mc.forEach(t)}function w(a,b,c,d){var e=a*a,f=b*b,g=(e-f)/e,h=0;d?(a*=1-g*(Db+g*(Eb+g*Fb)),e=a*a,g=0):h=Math.sqrt(g);var i=(e-f)/f;return{es:g,e:h,ep2:i}}function x(b,c,d,e,f){if(!b){var g=a(qc,e);g||(g=rc),b=g.a,c=g.b,d=g.rf}return d&&!c&&(c=(1-1/d)*b),(0===d||Math.abs(b-c)3&&(0===g.datum_params[3]&&0===g.datum_params[4]&&0===g.datum_params[5]&&0===g.datum_params[6]||(g.datum_type=yb,g.datum_params[3]*=Bb,g.datum_params[4]*=Bb,g.datum_params[5]*=Bb,g.datum_params[6]=g.datum_params[6]/1e6+1))),g.a=c,g.b=d,g.es=e,g.ep2=f,g}function z(b,c){if(!(this instanceof z))return new z(b);c=c||function(a){if(a)throw a};var d=n(b);if("object"!=typeof d)return void c(b);var e=z.projections.get(d.projName);if(!e)return void c(b);if(d.datumCode&&"none"!==d.datumCode){var f=a(sc,d.datumCode);f&&(d.datum_params=f.towgs84?f.towgs84.split(","):null,d.ellps=f.ellipse,d.datumName=f.datumName?f.datumName:d.datumCode)}d.k0=d.k0||1,d.axis=d.axis||"enu",d.ellps=d.ellps||"wgs84";var g=x(d.a,d.b,d.rf,d.ellps,d.sphere),h=w(g.a,g.b,g.rf,d.R_A),i=d.datum||y(d.datumCode,d.datum_params,g.a,g.b,h.es,h.ep2);cc(this,d),cc(this,e),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=h.es,this.e=h.e,this.ep2=h.ep2,this.datum=i,this.init(),c(null,this)}function A(a,b){return a.datum_type===b.datum_type&&(!(a.a!==b.a||Math.abs(a.es-b.es)>5e-11)&&(a.datum_type===xb?a.datum_params[0]===b.datum_params[0]&&a.datum_params[1]===b.datum_params[1]&&a.datum_params[2]===b.datum_params[2]:a.datum_type!==yb||a.datum_params[0]===b.datum_params[0]&&a.datum_params[1]===b.datum_params[1]&&a.datum_params[2]===b.datum_params[2]&&a.datum_params[3]===b.datum_params[3]&&a.datum_params[4]===b.datum_params[4]&&a.datum_params[5]===b.datum_params[5]&&a.datum_params[6]===b.datum_params[6]))}function B(a,b,c){var d,e,f,g,h=a.x,i=a.y,j=a.z?a.z:0;if(i<-Cb&&i>-1.001*Cb)i=-Cb;else if(i>Cb&&i<1.001*Cb)i=Cb;else if(i<-Cb||i>Cb)return null;return h>Math.PI&&(h-=2*Math.PI),e=Math.sin(i),g=Math.cos(i),f=e*e,d=c/Math.sqrt(1-b*f),{x:(d+j)*g*Math.cos(h),y:(d+j)*g*Math.sin(h),z:(d*(1-b)+j)*e}}function C(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=1e-12,v=u*u,w=30,x=a.x,y=a.y,z=a.z?a.z:0;if(e=Math.sqrt(x*x+y*y),f=Math.sqrt(x*x+y*y+z*z),e/cv&&q=56&&k<64&&l>=3&&l<12&&(j=32),k>=72&&k<84&&(l>=0&&l<9?j=31:l>=9&&l<21?j=33:l>=21&&l<33?j=35:l>=33&&l<42&&(j=37)),b=6*(j-1)-180+3,i=O(b),c=n/(1-n),d=m/Math.sqrt(1-n*Math.sin(p)*Math.sin(p)),e=Math.tan(p)*Math.tan(p),f=c*Math.cos(p)*Math.cos(p),g=Math.cos(p)*(q-i),h=m*((1-n/4-3*n*n/64-5*n*n*n/256)*p-(3*n/8+3*n*n/32+45*n*n*n/1024)*Math.sin(2*p)+(15*n*n/256+45*n*n*n/1024)*Math.sin(4*p)-35*n*n*n/3072*Math.sin(6*p));var r=o*d*(g+(1-e+f)*g*g*g/6+(5-18*e+e*e+72*f-58*c)*g*g*g*g*g/120)+5e5,s=o*(h+d*Math.tan(p)*(g*g/2+(5-e+9*f+4*f*f)*g*g*g*g/24+(61-58*e+e*e+600*f-330*c)*g*g*g*g*g*g/720));return k<0&&(s+=1e7),{northing:Math.round(s),easting:Math.round(r),zoneNumber:j,zoneLetter:S(k)}}function R(a){var b=a.northing,c=a.easting,d=a.zoneLetter,e=a.zoneNumber;if(e<0||e>60)return null;var f,g,h,i,j,k,l,m,n,o,p=.9996,q=6378137,r=.00669438,s=(1-Math.sqrt(1-r))/(1+Math.sqrt(1-r)),t=c-5e5,u=b;d<"N"&&(u-=1e7),m=6*(e-1)-180+3,f=r/(1-r),l=u/p,n=l/(q*(1-r/4-3*r*r/64-5*r*r*r/256)),o=n+(3*s/2-27*s*s*s/32)*Math.sin(2*n)+(21*s*s/16-55*s*s*s*s/32)*Math.sin(4*n)+151*s*s*s/96*Math.sin(6*n),g=q/Math.sqrt(1-r*Math.sin(o)*Math.sin(o)),h=Math.tan(o)*Math.tan(o),i=f*Math.cos(o)*Math.cos(o),j=q*(1-r)/Math.pow(1-r*Math.sin(o)*Math.sin(o),1.5),k=t/(g*p);var v=o-g*Math.tan(o)/j*(k*k/2-(5+3*h+10*i-4*i*i-9*f)*k*k*k*k/24+(61+90*h+298*i+45*h*h-252*f-3*i*i)*k*k*k*k*k*k/720);v=P(v);var w=(k-(1+2*h+i)*k*k*k/6+(5-2*i+28*h-3*i*i+8*f+24*h*h)*k*k*k*k*k/120)/Math.cos(o);w=m+P(w);var x;if(a.accuracy){var y=R({northing:a.northing+a.accuracy,easting:a.easting+a.accuracy,zoneLetter:a.zoneLetter,zoneNumber:a.zoneNumber});x={top:y.lat,right:y.lon,bottom:v,left:w}}else x={lat:v,lon:w};return x}function S(a){var b="Z";return 84>=a&&a>=72?b="X":72>a&&a>=64?b="W":64>a&&a>=56?b="V":56>a&&a>=48?b="U":48>a&&a>=40?b="T":40>a&&a>=32?b="S":32>a&&a>=24?b="R":24>a&&a>=16?b="Q":16>a&&a>=8?b="P":8>a&&a>=0?b="N":0>a&&a>=-8?b="M":-8>a&&a>=-16?b="L":-16>a&&a>=-24?b="K":-24>a&&a>=-32?b="J":-32>a&&a>=-40?b="H":-40>a&&a>=-48?b="G":-48>a&&a>=-56?b="F":-56>a&&a>=-64?b="E":-64>a&&a>=-72?b="D":-72>a&&a>=-80&&(b="C"),b}function T(a,b){var c="00000"+a.easting,d="00000"+a.northing;return a.zoneNumber+a.zoneLetter+U(a.easting,a.northing,a.zoneNumber)+c.substr(c.length-5,b)+d.substr(d.length-5,b)}function U(a,b,c){var d=V(c),e=Math.floor(a/1e5),f=Math.floor(b/1e5)%20;return W(e,f,d)}function V(a){var b=a%xc;return 0===b&&(b=xc),b}function W(a,b,c){var d=c-1,e=yc.charCodeAt(d),f=zc.charCodeAt(d),g=e+a-1,h=f+b,i=!1;g>Ec&&(g=g-Ec+Ac-1,i=!0),(g===Bc||eBc||(g>Bc||eCc||(g>Cc||eEc&&(g=g-Ec+Ac-1),h>Dc?(h=h-Dc+Ac-1,i=!0):i=!1,(h===Bc||fBc||(h>Bc||fCc||(h>Cc||fDc&&(h=h-Dc+Ac-1);var j=String.fromCharCode(g)+String.fromCharCode(h);return j}function X(a){if(a&&0===a.length)throw"MGRSPoint coverting from nothing";for(var b,c=a.length,d=null,e="",f=0;!/[A-Z]/.test(b=a.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+a;e+=b,f++}var g=parseInt(e,10);if(0===f||f+3>c)throw"MGRSPoint bad conversion from: "+a;var h=a.charAt(f++);if(h<="A"||"B"===h||"Y"===h||h>="Z"||"I"===h||"O"===h)throw"MGRSPoint zone letter "+h+" not handled: "+a;d=a.substring(f,f+=2);for(var i=V(g),j=Y(d.charAt(0),i),k=Z(d.charAt(1),i);k<$(h);)k+=2e6;var l=c-f;if(l%2!==0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+a;var m,n,o,p,q,r=l/2,s=0,t=0;return r>0&&(m=1e5/Math.pow(10,r),n=a.substring(f,f+r),s=parseFloat(n)*m,o=a.substring(f+r),t=parseFloat(o)*m),p=s+j,q=t+k,{easting:p,northing:q,zoneLetter:h,zoneNumber:g,accuracy:m}}function Y(a,b){for(var c=yc.charCodeAt(b-1),d=1e5,e=!1;c!==a.charCodeAt(0);){if(c++,c===Bc&&c++,c===Cc&&c++,c>Ec){if(e)throw"Bad character: "+a;c=Ac,e=!0}d+=1e5}return d}function Z(a,b){if(a>"V")throw"MGRSPoint given invalid Northing "+a;for(var c=zc.charCodeAt(b-1),d=0,e=!1;c!==a.charCodeAt(0);){if(c++,c===Bc&&c++,c===Cc&&c++,c>Dc){if(e)throw"Bad character: "+a;c=Ac,e=!0}d+=1e5}return d}function $(a){var b;switch(a){case"C":b=11e5;break;case"D":b=2e6;break;case"E":b=28e5;break;case"F":b=37e5;break;case"G":b=46e5;break;case"H":b=55e5;break;case"J":b=64e5;break;case"K":b=73e5;break;case"L":b=82e5;break;case"M":b=91e5;break;case"N":b=0;break;case"P":b=8e5;break;case"Q":b=17e5;break;case"R":b=26e5;break;case"S":b=35e5;break;case"T":b=44e5;break;case"U":b=53e5;break;case"V":b=62e5;break;case"W":b=7e6;break;case"X":b=79e5;break;default:b=-1}if(b>=0)return b;throw"Invalid zone letter: "+a}function Point(a,b,c){if(!(this instanceof Point))return new Point(a,b,c);if(Array.isArray(a))this.x=a[0],this.y=a[1],this.z=a[2]||0;else if("object"==typeof a)this.x=a.x,this.y=a.y,this.z=a.z||0;else if("string"==typeof a&&"undefined"==typeof b){var d=a.split(",");this.x=parseFloat(d[0],10),this.y=parseFloat(d[1],10),this.z=parseFloat(d[2],10)||0}else this.x=a,this.y=b,this.z=c||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function _(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Tc(this.es),this.ml0=Uc(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function aa(a){var b,c,d,e=a.x,f=a.y,g=fc(e-this.long0),h=Math.sin(f),i=Math.cos(f);if(this.es){var j=i*g,k=Math.pow(j,2),l=this.ep2*Math.pow(i,2),m=Math.pow(l,2),n=Math.abs(i)>Gb?Math.tan(f):0,o=Math.pow(n,2),p=Math.pow(o,2);b=1-this.es*Math.pow(h,2),j/=Math.sqrt(b);var q=Uc(f,h,i,this.en);c=this.a*(this.k0*j*(1+k/6*(1-o+l+k/20*(5-18*o+p+14*l-58*o*l+k/42*(61+179*p-p*o-479*o)))))+this.x0,d=this.a*(this.k0*(q-this.ml0+h*g*j/2*(1+k/12*(5-o+9*l+4*m+k/30*(61+p-58*o+270*l-330*o*l+k/56*(1385+543*p-p*o-3111*o))))))+this.y0}else{var r=i*Math.sin(g);if(Math.abs(Math.abs(r)-1)=1){if(r-1>Gb)return 93;d=0}else d=Math.acos(d);f<0&&(d=-d),d=this.a*this.k0*(d-this.lat0)+this.y0}return a.x=c,a.y=d,a}function ba(a){var b,c,d,e,f=(a.x-this.x0)*(1/this.a),g=(a.y-this.y0)*(1/this.a);if(this.es)if(b=this.ml0+g/this.k0,c=Wc(b,this.es,this.en),Math.abs(c)Gb?Math.tan(c):0,k=this.ep2*Math.pow(i,2),l=Math.pow(k,2),m=Math.pow(j,2),n=Math.pow(m,2);b=1-this.es*Math.pow(h,2);var o=f*Math.sqrt(b)/this.k0,p=Math.pow(o,2);b*=j,d=c-b*p/(1-this.es)*.5*(1-p/12*(5+3*m-9*k*m+k-4*l-p/30*(61+90*m-252*k*m+45*n+46*k-p/56*(1385+3633*m+4095*n+1574*n*m)))),e=fc(this.long0+o*(1-p/6*(1+2*m+k-p/20*(5+28*m+24*n+8*k*m+6*k-p/42*(61+662*m+1320*n+720*n*m))))/i)}else d=Cb*ec(g),e=0;else{var q=Math.exp(f/this.k0),r=.5*(q-1/q),s=this.lat0+g/this.k0,t=Math.cos(s);b=Math.sqrt((1-Math.pow(t,2))/(1+Math.pow(r,2))),d=Math.asin(b),g<0&&(d=-d),e=0===r&&0===t?0:fc(Math.atan2(r,t)+this.long0)}return a.x=e,a.y=d,a}function ca(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var a=this.es/(1+Math.sqrt(1-this.es)),b=a/(2-a),c=b;this.cgb[0]=b*(2+b*(-2/3+b*(-2+b*(116/45+b*(26/45+b*(-2854/675)))))),this.cbg[0]=b*(-2+b*(2/3+b*(4/3+b*(-82/45+b*(32/45+b*(4642/4725)))))),c*=b,this.cgb[1]=c*(7/3+b*(-1.6+b*(-227/45+b*(2704/315+b*(2323/945))))),this.cbg[1]=c*(5/3+b*(-16/15+b*(-13/9+b*(904/315+b*(-1522/945))))),c*=b,this.cgb[2]=c*(56/15+b*(-136/35+b*(-1262/105+b*(73814/2835)))),this.cbg[2]=c*(-26/15+b*(34/21+b*(1.6+b*(-12686/2835)))),c*=b,this.cgb[3]=c*(4279/630+b*(-332/35+b*(-399572/14175))),this.cbg[3]=c*(1237/630+b*(-2.4+b*(-24832/14175))),c*=b,this.cgb[4]=c*(4174/315+b*(-144838/6237)),this.cbg[4]=c*(-734/315+b*(109598/31185)),c*=b,this.cgb[5]=c*(601676/22275),this.cbg[5]=c*(444337/155925),c=Math.pow(b,2),this.Qn=this.k0/(1+b)*(1+c*(.25+c*(1/64+c/256))),this.utg[0]=b*(-.5+b*(2/3+b*(-37/96+b*(1/360+b*(81/512+b*(-96199/604800)))))),this.gtu[0]=b*(.5+b*(-2/3+b*(5/16+b*(41/180+b*(-127/288+b*(7891/37800)))))),this.utg[1]=c*(-1/48+b*(-1/15+b*(437/1440+b*(-46/105+b*(1118711/3870720))))),this.gtu[1]=c*(13/48+b*(-.6+b*(557/1440+b*(281/630+b*(-1983433/1935360))))),c*=b,this.utg[2]=c*(-17/480+b*(37/840+b*(209/4480+b*(-5569/90720)))),this.gtu[2]=c*(61/240+b*(-103/140+b*(15061/26880+b*(167603/181440)))),c*=b,this.utg[3]=c*(-4397/161280+b*(11/504+b*(830251/7257600))),this.gtu[3]=c*(49561/161280+b*(-179/168+b*(6601661/7257600))),c*=b,this.utg[4]=c*(-4583/161280+b*(108847/3991680)),this.gtu[4]=c*(34729/80640+b*(-3418889/1995840)),c*=b,this.utg[5]=c*-.03233083094085698,this.gtu[5]=.6650675310896665*c;var d=bd(this.cbg,this.lat0);this.Zb=-this.Qn*(d+cd(this.gtu,2*d))}function da(a){var b=fc(a.x-this.long0),c=a.y;c=bd(this.cbg,c);var d=Math.sin(c),e=Math.cos(c),f=Math.sin(b),g=Math.cos(b);c=Math.atan2(d,g*e),b=Math.atan2(f*e,$c(d,e*g)),b=ad(Math.tan(b));var h=ed(this.gtu,2*c,2*b);c+=h[0],b+=h[1];var i,j;return Math.abs(b)<=2.623395162778?(i=this.a*(this.Qn*b)+this.x0,j=this.a*(this.Qn*c+this.Zb)+this.y0):(i=1/0,j=1/0),a.x=i,a.y=j,a}function ea(a){var b=(a.x-this.x0)*(1/this.a),c=(a.y-this.y0)*(1/this.a);c=(c-this.Zb)/this.Qn,b/=this.Qn;var d,e;if(Math.abs(b)<=2.623395162778){var f=ed(this.utg,2*c,2*b);c+=f[0],b+=f[1],b=Math.atan(Zc(b));var g=Math.sin(c),h=Math.cos(c),i=Math.sin(b),j=Math.cos(b);c=Math.atan2(g*j,$c(i,j*h)),b=Math.atan2(i,j*h),d=fc(b+this.long0),e=bd(this.cgb,c)}else d=1/0,e=1/0;return a.x=d,a.y=e,a}function fa(){var a=hd(this.zone,this.long0);if(void 0===a)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(a)-183)*Hb,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,gd.init.apply(this),this.forward=gd.forward,this.inverse=gd.inverse}function ga(){var a=Math.sin(this.lat0),b=Math.cos(this.lat0);b*=b,this.rc=Math.sqrt(1-this.es)/(1-this.es*a*a),this.C=Math.sqrt(1+this.es*b*b/(1-this.es)),this.phic0=Math.asin(a/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Jb)/(Math.pow(Math.tan(.5*this.lat0+Jb),this.C)*ld(this.e*a,this.ratexp))}function ha(a){var b=a.x,c=a.y;return a.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*c+Jb),this.C)*ld(this.e*Math.sin(c),this.ratexp))-Cb,a.x=this.C*b,a}function ia(a){for(var b=1e-14,c=a.x/this.C,d=a.y,e=Math.pow(Math.tan(.5*d+Jb)/this.K,1/this.C),f=md;f>0&&(d=2*Math.atan(e*ld(this.e*Math.sin(a.y),-.5*this.e))-Cb,!(Math.abs(d-a.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Gb&&(this.k0=.5*this.cons*dc(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/gc(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=dc(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Cb,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function oa(a){var b,c,d,e,f,g,h=a.x,i=a.y,j=Math.sin(i),k=Math.cos(i),l=fc(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=Gb&&Math.abs(i+this.lat0)<=Gb?(a.x=NaN,a.y=NaN,a):this.sphere?(b=2*this.k0/(1+this.sinlat0*j+this.coslat0*k*Math.cos(l)),a.x=this.a*b*k*Math.sin(l)+this.x0,a.y=this.a*b*(this.coslat0*j-this.sinlat0*k*Math.cos(l))+this.y0,a):(c=2*Math.atan(this.ssfn_(i,j,this.e))-Cb,e=Math.cos(c),d=Math.sin(c),Math.abs(this.coslat0)<=Gb?(f=gc(this.e,i*this.con,this.con*j),g=2*this.a*this.k0*f/this.cons,a.x=this.x0+g*Math.sin(h-this.long0),a.y=this.y0-this.con*g*Math.cos(h-this.long0),a):(Math.abs(this.sinlat0)0?this.long0+Math.atan2(a.x,-1*a.y):this.long0+Math.atan2(a.x,a.y):this.long0+Math.atan2(a.x*Math.sin(h),g*this.coslat0*Math.cos(h)-a.y*this.sinlat0*Math.sin(h))),a.x=b,a.y=c,a)}if(Math.abs(this.coslat0)<=Gb){if(g<=Gb)return c=this.lat0,b=this.long0,a.x=b,a.y=c,a;a.x*=this.con,a.y*=this.con,d=g*this.cons/(2*this.a*this.k0),c=this.con*hc(this.e,d),b=this.con*fc(this.con*this.long0+Math.atan2(a.x,-1*a.y))}else e=2*Math.atan(g*this.cosX0/(2*this.a*this.k0*this.ms1)),b=this.long0,g<=Gb?f=this.X0:(f=Math.asin(Math.cos(e)*this.sinX0+a.y*Math.sin(e)*this.cosX0/g),b=fc(this.long0+Math.atan2(a.x*Math.sin(e),g*this.cosX0*Math.cos(e)-a.y*this.sinX0*Math.sin(e)))),c=-1*hc(this.e,Math.tan(.5*(Cb+f)));return a.x=b,a.y=c,a}function qa(){var a=this.lat0;this.lambda0=this.long0;var b=Math.sin(a),c=this.a,d=this.rf,e=1/d,f=2*e-Math.pow(e,2),g=this.e=Math.sqrt(f);this.R=this.k0*c*Math.sqrt(1-f)/(1-f*Math.pow(b,2)),this.alpha=Math.sqrt(1+f/(1-f)*Math.pow(Math.cos(a),4)),this.b0=Math.asin(b/this.alpha);var h=Math.log(Math.tan(Math.PI/4+this.b0/2)),i=Math.log(Math.tan(Math.PI/4+a/2)),j=Math.log((1+g*b)/(1-g*b));this.K=h-this.alpha*i+this.alpha*g/2*j}function ra(a){var b=Math.log(Math.tan(Math.PI/4-a.y/2)),c=this.e/2*Math.log((1+this.e*Math.sin(a.y))/(1-this.e*Math.sin(a.y))),d=-this.alpha*(b+c)+this.K,e=2*(Math.atan(Math.exp(d))-Math.PI/4),f=this.alpha*(a.x-this.lambda0),g=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(e)+Math.cos(this.b0)*Math.cos(f))),h=Math.asin(Math.cos(this.b0)*Math.sin(e)-Math.sin(this.b0)*Math.cos(e)*Math.cos(f));return a.y=this.R/2*Math.log((1+Math.sin(h))/(1-Math.sin(h)))+this.y0,a.x=this.R*g+this.x0,a}function sa(a){for(var b=a.x-this.x0,c=a.y-this.y0,d=b/this.R,e=2*(Math.atan(Math.exp(c/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(e)+Math.sin(this.b0)*Math.cos(e)*Math.cos(d)),g=Math.atan(Math.sin(d)/(Math.cos(this.b0)*Math.cos(d)-Math.sin(this.b0)*Math.tan(e))),h=this.lambda0+g/this.alpha,i=0,j=f,k=-1e3,l=0;Math.abs(j-k)>1e-7;){if(++l>20)return;i=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(j))/2)),k=j,j=2*Math.atan(Math.exp(i))-Math.PI/2}return a.x=h,a.y=j,a}function ta(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var a=Math.sin(this.lat0),b=Math.cos(this.lat0),c=this.e*a;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(b,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-c*c);var d=gc(this.e,this.lat0,a),e=this.bl/b*Math.sqrt((1-this.es)/(1-c*c));e*e<1&&(e=1);var f,g;if(isNaN(this.longc)){var h=gc(this.e,this.lat1,Math.sin(this.lat1)),i=gc(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(e+Math.sqrt(e*e-1))*Math.pow(d,this.bl):this.el=(e-Math.sqrt(e*e-1))*Math.pow(d,this.bl);var j=Math.pow(h,this.bl),k=Math.pow(i,this.bl);f=this.el/j,g=.5*(f-1/f);var l=(this.el*this.el-k*j)/(this.el*this.el+k*j),m=(k-j)/(k+j),n=fc(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(l*Math.tan(.5*this.bl*n)/m)/this.bl,this.long0=fc(this.long0);var o=fc(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*o)/g),this.alpha=Math.asin(e*Math.sin(this.gamma0))}else f=this.lat0>=0?e+Math.sqrt(e*e-1):e-Math.sqrt(e*e-1),this.el=f*Math.pow(d,this.bl),g=.5*(f-1/f),this.gamma0=Math.asin(Math.sin(this.alpha)/e),this.long0=this.longc-Math.asin(g*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(e*e-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(e*e-1),Math.cos(this.alpha))}function ua(a){var b,c,d,e=a.x,f=a.y,g=fc(e-this.long0);if(Math.abs(Math.abs(f)-Cb)<=Gb)d=f>0?-1:1,c=this.al/this.bl*Math.log(Math.tan(Jb+d*this.gamma0*.5)),b=-1*d*Cb*this.al/this.bl;else{var h=gc(this.e,f,Math.sin(f)),i=this.el/Math.pow(h,this.bl),j=.5*(i-1/i),k=.5*(i+1/i),l=Math.sin(this.bl*g),m=(j*Math.sin(this.gamma0)-l*Math.cos(this.gamma0))/k;c=Math.abs(Math.abs(m)-1)<=Gb?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-m)/(1+m))/this.bl,b=Math.abs(Math.cos(this.bl*g))<=Gb?this.al*this.bl*g:this.al*Math.atan2(j*Math.cos(this.gamma0)+l*Math.sin(this.gamma0),Math.cos(this.bl*g))/this.bl}return this.no_rot?(a.x=this.x0+b,a.y=this.y0+c):(b-=this.uc,a.x=this.x0+c*Math.cos(this.alpha)+b*Math.sin(this.alpha),a.y=this.y0+b*Math.cos(this.alpha)-c*Math.sin(this.alpha)),a}function va(a){var b,c;this.no_rot?(c=a.y-this.y0,b=a.x-this.x0):(c=(a.x-this.x0)*Math.cos(this.alpha)-(a.y-this.y0)*Math.sin(this.alpha),b=(a.y-this.y0)*Math.cos(this.alpha)+(a.x-this.x0)*Math.sin(this.alpha),b+=this.uc);var d=Math.exp(-1*this.bl*c/this.al),e=.5*(d-1/d),f=.5*(d+1/d),g=Math.sin(this.bl*b/this.al),h=(g*Math.cos(this.gamma0)+e*Math.sin(this.gamma0))/f,i=Math.pow(this.el/Math.sqrt((1+h)/(1-h)),1/this.bl);return Math.abs(h-1)Gb?this.ns=Math.log(d/h)/Math.log(e/i):this.ns=b,isNaN(this.ns)&&(this.ns=b),this.f0=d/(this.ns*Math.pow(e,this.ns)),this.rh=this.a*this.f0*Math.pow(j,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function xa(a){var b=a.x,c=a.y;Math.abs(2*Math.abs(c)-Math.PI)<=Gb&&(c=ec(c)*(Cb-2*Gb));var d,e,f=Math.abs(Math.abs(c)-Cb);if(f>Gb)d=gc(this.e,c,Math.sin(c)),e=this.a*this.f0*Math.pow(d,this.ns);else{if(f=c*this.ns,f<=0)return null;e=0}var g=this.ns*fc(b-this.long0);return a.x=this.k0*(e*Math.sin(g))+this.x0,a.y=this.k0*(this.rh-e*Math.cos(g))+this.y0,a}function ya(a){var b,c,d,e,f,g=(a.x-this.x0)/this.k0,h=this.rh-(a.y-this.y0)/this.k0;this.ns>0?(b=Math.sqrt(g*g+h*h),c=1):(b=-Math.sqrt(g*g+h*h),c=-1);var i=0;if(0!==b&&(i=Math.atan2(c*g,c*h)),0!==b||this.ns>0){if(c=1/this.ns,d=Math.pow(b/(this.a*this.f0),c),e=hc(this.e,d),e===-9999)return null}else e=-Cb;return f=fc(i/this.ns+this.long0),a.x=f,a.y=e,a}function za(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Aa(a){var b,c,d,e,f,g,h,i=a.x,j=a.y,k=fc(i-this.long0);return b=Math.pow((1+this.e*Math.sin(j))/(1-this.e*Math.sin(j)),this.alfa*this.e/2),c=2*(Math.atan(this.k*Math.pow(Math.tan(j/2+this.s45),this.alfa)/b)-this.s45),d=-k*this.alfa,
+e=Math.asin(Math.cos(this.ad)*Math.sin(c)+Math.sin(this.ad)*Math.cos(c)*Math.cos(d)),f=Math.asin(Math.cos(c)*Math.sin(d)/Math.cos(e)),g=this.n*f,h=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(e/2+this.s45),this.n),a.y=h*Math.cos(g)/1,a.x=h*Math.sin(g)/1,this.czech||(a.y*=-1,a.x*=-1),a}function Ba(a){var b,c,d,e,f,g,h,i,j=a.x;a.x=a.y,a.y=j,this.czech||(a.y*=-1,a.x*=-1),g=Math.sqrt(a.x*a.x+a.y*a.y),f=Math.atan2(a.y,a.x),e=f/Math.sin(this.s0),d=2*(Math.atan(Math.pow(this.ro0/g,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),b=Math.asin(Math.cos(this.ad)*Math.sin(d)-Math.sin(this.ad)*Math.cos(d)*Math.cos(e)),c=Math.asin(Math.cos(d)*Math.sin(e)/Math.cos(b)),a.x=this.long0-c/this.alfa,h=b,i=0;var k=0;do a.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(b/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.e/2))-this.s45),Math.abs(h-a.y)<1e-10&&(i=1),h=a.y,k+=1;while(0===i&&k<15);return k>=15?null:a}function Ca(){this.sphere||(this.e0=Cd(this.es),this.e1=Dd(this.es),this.e2=Ed(this.es),this.e3=Fd(this.es),this.ml0=this.a*Bd(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Da(a){var b,c,d=a.x,e=a.y;if(d=fc(d-this.long0),this.sphere)b=this.a*Math.asin(Math.cos(e)*Math.sin(d)),c=this.a*(Math.atan2(Math.tan(e),Math.cos(d))-this.lat0);else{var f=Math.sin(e),g=Math.cos(e),h=Gd(this.a,this.e,f),i=Math.tan(e)*Math.tan(e),j=d*Math.cos(e),k=j*j,l=this.es*g*g/(1-this.es),m=this.a*Bd(this.e0,this.e1,this.e2,this.e3,e);b=h*j*(1-k*i*(1/6-(8-i+8*l)*k/120)),c=m-this.ml0+h*f/g*k*(.5+(5-i+6*l)*k/24)}return a.x=b+this.x0,a.y=c+this.y0,a}function Ea(a){a.x-=this.x0,a.y-=this.y0;var b,c,d=a.x/this.a,e=a.y/this.a;if(this.sphere){var f=e+this.lat0;b=Math.asin(Math.sin(f)*Math.cos(d)),c=Math.atan2(Math.tan(d),Math.cos(f))}else{var g=this.ml0/this.a+e,h=Id(g,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(h)-Cb)<=Gb)return a.x=this.long0,a.y=Cb,e<0&&(a.y*=-1),a;var i=Gd(this.a,this.e,Math.sin(h)),j=i*i*i/this.a/this.a*(1-this.es),k=Math.pow(Math.tan(h),2),l=d*this.a/i,m=l*l;b=h-i*Math.tan(h)/j*l*l*(.5-(1+3*k)*l*l/24),c=l*(1-m*(k/3+(1+3*k)*k*m/15))/Math.cos(h)}return a.x=fc(c+this.long0),a.y=Hd(b),a}function Fa(){var a=Math.abs(this.lat0);if(Math.abs(a-Cb)0){var b;switch(this.qp=Ld(this.e,1),this.mmf=.5/(1-this.es),this.apa=Ia(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),b=Math.sin(this.lat0),this.sinb1=Ld(this.e,b)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*b*b)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Ga(a){var b,c,d,e,f,g,h,i,j,k,l=a.x,m=a.y;if(l=fc(l-this.long0),this.sphere){if(f=Math.sin(m),k=Math.cos(m),d=Math.cos(l),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c=this.mode===this.EQUIT?1+k*d:1+this.sinph0*f+this.cosph0*k*d,c<=Gb)return null;c=Math.sqrt(2/c),b=c*k*Math.sin(l),c*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*k*d}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),Math.abs(m+this.phi0)=0?(b=(j=Math.sqrt(g))*e,c=d*(this.mode===this.S_POLE?j:-j)):b=c=0}}return a.x=this.a*b+this.x0,a.y=this.a*c+this.y0,a}function Ha(a){a.x-=this.x0,a.y-=this.y0;var b,c,d,e,f,g,h,i=a.x/this.a,j=a.y/this.a;if(this.sphere){var k,l=0,m=0;if(k=Math.sqrt(i*i+j*j),c=.5*k,c>1)return null;switch(c=2*Math.asin(c),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(c),l=Math.cos(c)),this.mode){case this.EQUIT:c=Math.abs(k)<=Gb?0:Math.asin(j*m/k),i*=m,j=l*k;break;case this.OBLIQ:c=Math.abs(k)<=Gb?this.phi0:Math.asin(l*this.sinph0+j*m*this.cosph0/k),i*=m*this.cosph0,j=(l-Math.sin(c)*this.sinph0)*k;break;case this.N_POLE:j=-j,c=Cb-c;break;case this.S_POLE:c-=Cb}b=0!==j||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(i,j):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i/=this.dd,j*=this.dd,g=Math.sqrt(i*i+j*j),gGb?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function La(a){var b=a.x,c=a.y;this.sin_phi=Math.sin(c),this.cos_phi=Math.cos(c);var d=Ld(this.e3,this.sin_phi,this.cos_phi),e=this.a*Math.sqrt(this.c-this.ns0*d)/this.ns0,f=this.ns0*fc(b-this.long0),g=e*Math.sin(f)+this.x0,h=this.rh-e*Math.cos(f)+this.y0;return a.x=g,a.y=h,a}function Ma(a){var b,c,d,e,f,g;return a.x-=this.x0,a.y=this.rh-a.y+this.y0,this.ns0>=0?(b=Math.sqrt(a.x*a.x+a.y*a.y),d=1):(b=-Math.sqrt(a.x*a.x+a.y*a.y),d=-1),e=0,0!==b&&(e=Math.atan2(d*a.x,d*a.y)),d=b*this.ns0/this.a,this.sphere?g=Math.asin((this.c-d*d)/(2*this.ns0)):(c=(this.c-d*d)/this.ns0,g=this.phi1z(this.e3,c)),f=fc(e/this.ns0+this.long0),a.x=f,a.y=g,a}function Na(a,b){var c,d,e,f,g,h=Yd(.5*b);if(a0||Math.abs(g)<=Gb?(h=this.x0+this.a*f*c*Math.sin(d)/g,i=this.y0+this.a*f*(this.cos_p14*b-this.sin_p14*c*e)/g):(h=this.x0+this.infinity_dist*c*Math.sin(d),i=this.y0+this.infinity_dist*(this.cos_p14*b-this.sin_p14*c*e)),a.x=h,a.y=i,a}function Qa(a){var b,c,d,e,f,g;return a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,a.x/=this.k0,a.y/=this.k0,(b=Math.sqrt(a.x*a.x+a.y*a.y))?(e=Math.atan2(b,this.rc),c=Math.sin(e),d=Math.cos(e),g=Yd(d*this.sin_p14+a.y*c*this.cos_p14/b),f=Math.atan2(a.x*c,b*this.cos_p14*d-a.y*this.sin_p14*c),f=fc(this.long0+f)):(g=this.phic0,f=0),a.x=f,a.y=g,a}function Ra(){this.sphere||(this.k0=dc(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Sa(a){var b,c,d=a.x,e=a.y,f=fc(d-this.long0);if(this.sphere)b=this.x0+this.a*f*Math.cos(this.lat_ts),c=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var g=Ld(this.e,Math.sin(e));b=this.x0+this.a*this.k0*f,c=this.y0+this.a*g*.5/this.k0}return a.x=b,a.y=c,a}function Ta(a){a.x-=this.x0,a.y-=this.y0;var b,c;return this.sphere?(b=fc(this.long0+a.x/this.a/Math.cos(this.lat_ts)),c=Math.asin(a.y/this.a*Math.cos(this.lat_ts))):(c=be(this.e,2*a.y*this.k0/this.a),b=fc(this.long0+a.x/(this.a*this.k0))),a.x=b,a.y=c,a}function Ua(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Va(a){var b=a.x,c=a.y,d=fc(b-this.long0),e=Hd(c-this.lat0);return a.x=this.x0+this.a*d*this.rc,a.y=this.y0+this.a*e,a}function Wa(a){var b=a.x,c=a.y;return a.x=fc(this.long0+(b-this.x0)/(this.a*this.rc)),a.y=Hd(this.lat0+(c-this.y0)/this.a),a}function Xa(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Cd(this.es),this.e1=Dd(this.es),this.e2=Ed(this.es),this.e3=Fd(this.es),this.ml0=this.a*Bd(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Ya(a){var b,c,d,e=a.x,f=a.y,g=fc(e-this.long0);if(d=g*Math.sin(f),this.sphere)Math.abs(f)<=Gb?(b=this.a*g,c=-1*this.a*this.lat0):(b=this.a*Math.sin(d)/Math.tan(f),c=this.a*(Hd(f-this.lat0)+(1-Math.cos(d))/Math.tan(f)));else if(Math.abs(f)<=Gb)b=this.a*g,c=-1*this.ml0;else{var h=Gd(this.a,this.e,Math.sin(f))/Math.tan(f);b=h*Math.sin(d),c=this.a*Bd(this.e0,this.e1,this.e2,this.e3,f)-this.ml0+h*(1-Math.cos(d))}return a.x=b+this.x0,a.y=c+this.y0,a}function Za(a){var b,c,d,e,f,g,h,i,j;if(d=a.x-this.x0,e=a.y-this.y0,this.sphere)if(Math.abs(e+this.a*this.lat0)<=Gb)b=fc(d/this.a+this.long0),c=0;else{g=this.lat0+e/this.a,h=d*d/this.a/this.a+g*g,i=g;var k;for(f=ge;f;--f)if(k=Math.tan(i),j=-1*(g*(i*k+1)-i-.5*(i*i+h)*k)/((i-g)/k-1),i+=j,Math.abs(j)<=Gb){c=i;break}b=fc(this.long0+Math.asin(d*Math.tan(i)/this.a)/Math.sin(c))}else if(Math.abs(e+this.ml0)<=Gb)c=0,b=fc(this.long0+d/this.a);else{g=(this.ml0+e)/this.a,h=d*d/this.a/this.a+g*g,i=g;var l,m,n,o,p;for(f=ge;f;--f)if(p=this.e*Math.sin(i),l=Math.sqrt(1-p*p)*Math.tan(i),m=this.a*Bd(this.e0,this.e1,this.e2,this.e3,i),n=this.e0-2*this.e1*Math.cos(2*i)+4*this.e2*Math.cos(4*i)-6*this.e3*Math.cos(6*i),o=m/this.a,j=(g*(l*o+1)-o-.5*l*(o*o+h))/(this.es*Math.sin(2*i)*(o*o+h-2*g*o)/(4*l)+(g-o)*(l*n-2/Math.sin(2*i))-n),i-=j,Math.abs(j)<=Gb){c=i;break}l=Math.sqrt(1-this.es*Math.pow(Math.sin(c),2))*Math.tan(c),b=fc(this.long0+Math.asin(d*l/this.a)/Math.sin(c))}return a.x=b,a.y=c,a}function $a(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function _a(a){var b,c=a.x,d=a.y,e=d-this.lat0,f=c-this.long0,g=e/Bb*1e-5,h=f,i=1,j=0;for(b=1;b<=10;b++)i*=g,j+=this.A[b]*i;var k,l,m=j,n=h,o=1,p=0,q=0,r=0;for(b=1;b<=6;b++)k=o*m-p*n,l=p*m+o*n,o=k,p=l,q=q+this.B_re[b]*o-this.B_im[b]*p,r=r+this.B_im[b]*o+this.B_re[b]*p;return a.x=r*this.a+this.x0,a.y=q*this.a+this.y0,a}function ab(a){var b,c,d,e=a.x,f=a.y,g=e-this.x0,h=f-this.y0,i=h/this.a,j=g/this.a,k=1,l=0,m=0,n=0;for(b=1;b<=6;b++)c=k*i-l*j,d=l*i+k*j,k=c,l=d,m=m+this.C_re[b]*k-this.C_im[b]*l,n=n+this.C_im[b]*k+this.C_re[b]*l;for(var o=0;o.999999999999&&(c=.999999999999),b=Math.asin(c);var d=fc(this.long0+a.x/(.900316316158*this.a*Math.cos(b)));d<-Math.PI&&(d=-Math.PI),d>Math.PI&&(d=Math.PI),c=(2*b+Math.sin(2*b))/Math.PI,Math.abs(c)>1&&(c=1);var e=Math.asin(c);return a.x=d,a.y=e,a}function kb(){Math.abs(this.lat1+this.lat2)=0?(c=Math.sqrt(a.x*a.x+a.y*a.y),b=1):(c=-Math.sqrt(a.x*a.x+a.y*a.y),b=-1);var f=0;if(0!==c&&(f=Math.atan2(b*a.x,b*a.y)),this.sphere)return e=fc(this.long0+f/this.ns),d=Hd(this.g-c/this.a),a.x=e,a.y=d,a;var g=this.g-c/this.a;return d=Id(g,this.e0,this.e1,this.e2,this.e3),e=fc(this.long0+f/this.ns),a.x=e,a.y=d,a}function nb(){this.R=this.a}function ob(a){var b,c,d=a.x,e=a.y,f=fc(d-this.long0);Math.abs(e)<=Gb&&(b=this.x0+this.R*f,c=this.y0);var g=Yd(2*Math.abs(e/Math.PI));(Math.abs(f)<=Gb||Math.abs(Math.abs(e)-Cb)<=Gb)&&(b=this.x0,c=e>=0?this.y0+Math.PI*this.R*Math.tan(.5*g):this.y0+Math.PI*this.R*-Math.tan(.5*g));var h=.5*Math.abs(Math.PI/f-f/Math.PI),i=h*h,j=Math.sin(g),k=Math.cos(g),l=k/(j+k-1),m=l*l,n=l*(2/j-1),o=n*n,p=Math.PI*this.R*(h*(l-o)+Math.sqrt(i*(l-o)*(l-o)-(o+i)*(m-o)))/(o+i);f<0&&(p=-p),b=this.x0+p;var q=i+l;return p=Math.PI*this.R*(n*q-h*Math.sqrt((o+i)*(i+1)-q*q))/(o+i),c=e>=0?this.y0+p:this.y0-p,a.x=b,a.y=c,a}function pb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.x-=this.x0,a.y-=this.y0,l=Math.PI*this.R,d=a.x/l,e=a.y/l,f=d*d+e*e,g=-Math.abs(e)*(1+f),h=g-2*e*e+d*d,i=-2*g+1+2*e*e+f*f,n=e*e/i+(2*h*h*h/i/i/i-9*g*h/i/i)/27,j=(g-h*h/3/i)/i,k=2*Math.sqrt(-j/3),l=3*n/j/k,Math.abs(l)>1&&(l=l>=0?1:-1),m=Math.acos(l)/3,c=a.y>=0?(-k*Math.cos(m+Math.PI/3)-h/3/i)*Math.PI:-(-k*Math.cos(m+Math.PI/3)-h/3/i)*Math.PI,b=Math.abs(d)2*Cb*this.a)return;return c=b/this.a,d=Math.sin(c),e=Math.cos(c),f=this.long0,Math.abs(b)<=Gb?g=this.lat0:(g=Yd(e*this.sin_p12+a.y*d*this.cos_p12/b),h=Math.abs(this.lat0)-Cb,f=fc(Math.abs(h)<=Gb?this.lat0>=0?this.long0+Math.atan2(a.x,-a.y):this.long0-Math.atan2(-a.x,a.y):this.long0+Math.atan2(a.x*d,b*this.cos_p12*e-a.y*this.sin_p12*d))),a.x=f,a.y=g,a}return i=Cd(this.es),j=Dd(this.es),k=Ed(this.es),l=Fd(this.es),Math.abs(this.sin_p12-1)<=Gb?(m=this.a*Bd(i,j,k,l,Cb),b=Math.sqrt(a.x*a.x+a.y*a.y),n=m-b,g=Id(n/this.a,i,j,k,l),f=fc(this.long0+Math.atan2(a.x,-1*a.y)),a.x=f,a.y=g,a):Math.abs(this.sin_p12+1)<=Gb?(m=this.a*Bd(i,j,k,l,Cb),b=Math.sqrt(a.x*a.x+a.y*a.y),n=b-m,g=Id(n/this.a,i,j,k,l),f=fc(this.long0+Math.atan2(a.x,a.y)),a.x=f,a.y=g,a):(b=Math.sqrt(a.x*a.x+a.y*a.y),q=Math.atan2(a.x,a.y),o=Gd(this.a,this.e,this.sin_p12),r=Math.cos(q),s=this.e*this.cos_p12*r,t=-s*s/(1-this.es),u=3*this.es*(1-t)*this.sin_p12*this.cos_p12*r/(1-this.es),v=b/o,w=v-t*(1+t)*Math.pow(v,3)/6-u*(1+3*t)*Math.pow(v,4)/24,x=1-t*w*w/2-v*w*w*w/6,p=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*r),f=fc(this.long0+Math.asin(Math.sin(q)*Math.sin(w)/Math.cos(p))),g=Math.atan((1-this.es*x*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),a.x=f,a.y=g,a)}function tb(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function ub(a){var b,c,d,e,f,g,h,i,j=a.x,k=a.y;return d=fc(j-this.long0),b=Math.sin(k),c=Math.cos(k),e=Math.cos(d),g=this.sin_p14*b+this.cos_p14*c*e,f=1,(g>0||Math.abs(g)<=Gb)&&(h=this.a*f*c*Math.sin(d),i=this.y0+this.a*f*(this.cos_p14*b-this.sin_p14*c*e)),a.x=h,a.y=i,a}function vb(a){var b,c,d,e,f,g,h;return a.x-=this.x0,a.y-=this.y0,b=Math.sqrt(a.x*a.x+a.y*a.y),c=Yd(b/this.a),d=Math.sin(c),e=Math.cos(c),g=this.long0,Math.abs(b)<=Gb?(h=this.lat0,a.x=g,a.y=h,a):(h=Yd(e*this.sin_p14+a.y*d*this.cos_p14/b),f=Math.abs(this.lat0)-Cb,Math.abs(f)<=Gb?(g=fc(this.lat0>=0?this.long0+Math.atan2(a.x,-a.y):this.long0-Math.atan2(-a.x,a.y)),a.x=g,a.y=h,a):(g=fc(this.long0+Math.atan2(a.x*d,b*this.cos_p14*e-a.y*this.sin_p14*d)),a.x=g,a.y=h,a))}var wb=function(a){a("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),a("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),a("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),a.WGS84=a["EPSG:4326"],a["EPSG:3785"]=a["EPSG:3857"],a.GOOGLE=a["EPSG:3857"],a["EPSG:900913"]=a["EPSG:3857"],a["EPSG:102113"]=a["EPSG:3857"]},xb=1,yb=2,zb=4,Ab=5,Bb=484813681109536e-20,Cb=Math.PI/2,Db=.16666666666666666,Eb=.04722222222222222,Fb=.022156084656084655,Gb="undefined"==typeof Number.EPSILON?1e-10:Number.EPSILON,Hb=.017453292519943295,Ib=57.29577951308232,Jb=Math.PI/4,Kb=2*Math.PI,Lb=3.14159265359,Mb={};Mb.greenwich=0,Mb.lisbon=-9.131906111111,Mb.paris=2.337229166667,Mb.bogota=-74.080916666667,Mb.madrid=-3.687938888889,Mb.rome=12.452333333333,Mb.bern=7.439583333333,Mb.jakarta=106.807719444444,Mb.ferro=-17.666666666667,Mb.brussels=4.367975,Mb.stockholm=18.058277777778,Mb.athens=23.7163375,Mb.oslo=10.722916666667;var Nb={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ob=/[\s_\-\/\(\)]/g,Pb=function(b){var c,d,e,f={},g=b.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,b){var c=b.split("=");return c.push(!0),a[c[0].toLowerCase()]=c[1],a},{}),h={proj:"projName",datum:"datumCode",rf:function(a){f.rf=parseFloat(a)},lat_0:function(a){f.lat0=a*Hb},lat_1:function(a){f.lat1=a*Hb},lat_2:function(a){f.lat2=a*Hb},lat_ts:function(a){f.lat_ts=a*Hb},lon_0:function(a){f.long0=a*Hb},lon_1:function(a){f.long1=a*Hb},lon_2:function(a){f.long2=a*Hb},alpha:function(a){f.alpha=parseFloat(a)*Hb},lonc:function(a){f.longc=a*Hb},x_0:function(a){f.x0=parseFloat(a)},y_0:function(a){f.y0=parseFloat(a)},k_0:function(a){f.k0=parseFloat(a)},k:function(a){f.k0=parseFloat(a)},a:function(a){f.a=parseFloat(a)},b:function(a){f.b=parseFloat(a)},r_a:function(){f.R_A=!0},zone:function(a){f.zone=parseInt(a,10)},south:function(){f.utmSouth=!0},towgs84:function(a){f.datum_params=a.split(",").map(function(a){return parseFloat(a)})},to_meter:function(a){f.to_meter=parseFloat(a)},units:function(b){f.units=b;var c=a(Nb,b);c&&(f.to_meter=c.to_meter)},from_greenwich:function(a){f.from_greenwich=a*Hb},pm:function(b){var c=a(Mb,b);f.from_greenwich=(c?c:parseFloat(b))*Hb},nadgrids:function(a){"@null"===a?f.datumCode="none":f.nadgrids=a},axis:function(a){var b="ewnsud";3===a.length&&b.indexOf(a.substr(0,1))!==-1&&b.indexOf(a.substr(1,1))!==-1&&b.indexOf(a.substr(2,1))!==-1&&(f.axis=a)}};for(c in g)d=g[c],c in h?(e=h[c],"function"==typeof e?e(d):f[e]=d):f[c]=d;return"string"==typeof f.datumCode&&"WGS84"!==f.datumCode&&(f.datumCode=f.datumCode.toLowerCase()),f},Qb=1,Rb=2,Sb=3,Tb=4,Ub=5,Vb=-1,Wb=/\s/,Xb=/[A-Za-z]/,Yb=/[A-Za-z84]/,Zb=/[,\]]/,$b=/[\d\.E\-\+]/;b.prototype.readCharicter=function(){var a=this.text[this.place++];if(this.state!==Tb)for(;Wb.test(a);){if(this.place>=this.text.length)return;a=this.text[this.place++]}switch(this.state){case Qb:return this.neutral(a);case Rb:return this.keyword(a);case Tb:return this.quoted(a);case Ub:return this.afterquote(a);case Sb:return this.number(a);case Vb:return}},b.prototype.afterquote=function(a){if('"'===a)return this.word+='"',void(this.state=Tb);if(Zb.test(a))return this.word=this.word.trim(),void this.afterItem(a);throw new Error("havn't handled \""+a+'" in afterquote yet, index '+this.place)},b.prototype.afterItem=function(a){return","===a?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Qb)):"]"===a?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Qb,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=Vb))):void 0},b.prototype.number=function(a){if($b.test(a))return void(this.word+=a);if(Zb.test(a))return this.word=parseFloat(this.word),void this.afterItem(a);throw new Error("havn't handled \""+a+'" in number yet, index '+this.place)},b.prototype.quoted=function(a){return'"'===a?void(this.state=Ub):void(this.word+=a)},b.prototype.keyword=function(a){if(Yb.test(a))return void(this.word+=a);if("["===a){var b=[];return b.push(this.word),this.level++,null===this.root?this.root=b:this.currentObject.push(b),this.stack.push(this.currentObject),this.currentObject=b,void(this.state=Qb)}if(Zb.test(a))return void this.afterItem(a);throw new Error("havn't handled \""+a+'" in keyword yet, index '+this.place)},b.prototype.neutral=function(a){if(Xb.test(a))return this.word=a,void(this.state=Rb);if('"'===a)return this.word="",void(this.state=Tb);if($b.test(a))return this.word=a,void(this.state=Sb);if(Zb.test(a))return void this.afterItem(a);throw new Error("havn't handled \""+a+'" in neutral yet, index '+this.place)},b.prototype.output=function(){for(;this.place2&&(b.z=a[2]),a.length>3&&(b.m=a[3]),b},wc=z("WGS84"),xc=6,yc="AJSAJS",zc="AFAFAF",Ac=65,Bc=73,Cc=79,Dc=86,Ec=90,Fc={forward:L,inverse:M,toPoint:N};Point.fromMGRS=function(a){return new Point(N(a))},Point.prototype.toMGRS=function(a){return L([this.x,this.y],a)};var Gc="2.4.3",Hc=1,Ic=.25,Jc=.046875,Kc=.01953125,Lc=.01068115234375,Mc=.75,Nc=.46875,Oc=.013020833333333334,Pc=.007120768229166667,Qc=.3645833333333333,Rc=.005696614583333333,Sc=.3076171875,Tc=function(a){var b=[];b[0]=Hc-a*(Ic+a*(Jc+a*(Kc+a*Lc))),b[1]=a*(Mc-a*(Jc+a*(Kc+a*Lc)));var c=a*a;return b[2]=c*(Nc-a*(Oc+a*Pc)),c*=a,b[3]=c*(Qc-a*Rc),b[4]=c*a*Sc,b},Uc=function(a,b,c,d){return c*=b,b*=b,d[0]*a-c*(d[1]+b*(d[2]+b*(d[3]+b*d[4])))},Vc=20,Wc=function(a,b,c){for(var d=1/(1-b),e=a,f=Vc;f;--f){var g=Math.sin(e),h=1-b*g*g;if(h=(Uc(e,g,Math.cos(e),c)-a)*(h*Math.sqrt(h))*d,e-=h,Math.abs(h)=0;)c=-g+d*f+a[e],g=f,f=c;return b+c*Math.sin(2*b)},cd=function(a,b){for(var c,d=2*Math.cos(b),e=a.length-1,f=a[e],g=0;--e>=0;)c=-g+d*f+a[e],g=f,f=c;return Math.sin(b)*c},dd=function(a){var b=Math.exp(a);return b=(b+1/b)/2},ed=function(a,b,c){for(var d,e,f=Math.sin(b),g=Math.cos(b),h=Zc(c),i=dd(c),j=2*g*i,k=-2*f*h,l=a.length-1,m=a[l],n=0,o=0,p=0;--l>=0;)d=o,e=n,o=m,n=p,m=-d+j*o-k*n+a[l],p=-e+k*o+j*n;return j=f*i,k=g*h,[j*m-k*p,j*p+k*m]},fd=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],gd={init:ca,forward:da,inverse:ea,names:fd},hd=function(a,b){if(void 0===a){if(a=Math.floor(30*(fc(b)+Math.PI)/Math.PI)+1,a<0)return 0;if(a>60)return 60}return a},id="etmerc",jd=["Universal Transverse Mercator System","utm"],kd={init:fa,names:jd,dependsOn:id},ld=function(a,b){return Math.pow((1-a)/(1+a),b)},md=20,nd=["gauss"],od={init:ga,forward:ha,inverse:ia,names:nd},pd=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative"],qd={init:ja,forward:ka,inverse:la,names:pd},rd=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],sd={init:na,forward:oa,inverse:pa,names:rd,ssfn_:ma},td=["somerc"],ud={init:qa,forward:ra,inverse:sa,names:td},vd=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],wd={init:ta,forward:ua,inverse:va,names:vd},xd=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],yd={init:wa,forward:xa,inverse:ya,names:xd},zd=["Krovak","krovak"],Ad={init:za,forward:Aa,inverse:Ba,names:zd},Bd=function(a,b,c,d,e){return a*e-b*Math.sin(2*e)+c*Math.sin(4*e)-d*Math.sin(6*e)},Cd=function(a){return 1-.25*a*(1+a/16*(3+1.25*a))},Dd=function(a){return.375*a*(1+.25*a*(1+.46875*a))},Ed=function(a){return.05859375*a*a*(1+.75*a)},Fd=function(a){return a*a*a*(35/3072)},Gd=function(a,b,c){var d=b*c;return a/Math.sqrt(1-d*d)},Hd=function(a){return Math.abs(a)1e-7?(c=a*b,(1-a*a)*(b/(1-c*c)-.5/a*Math.log((1-c)/(1+c)))):2*b},Md=1,Nd=2,Od=3,Pd=4,Qd=.3333333333333333,Rd=.17222222222222222,Sd=.10257936507936508,Td=.06388888888888888,Ud=.0664021164021164,Vd=.016415012942191543,Wd=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],Xd={init:Fa,forward:Ga,inverse:Ha,names:Wd,S_POLE:Md,N_POLE:Nd,EQUIT:Od,OBLIQ:Pd},Yd=function(a){return Math.abs(a)>1&&(a=a>1?1:-1),Math.asin(a)},Zd=["Albers_Conic_Equal_Area","Albers","aea"],$d={init:Ka,forward:La,inverse:Ma,names:Zd,phi1z:Na},_d=["gnom"],ae={init:Oa,forward:Pa,inverse:Qa,names:_d},be=function(a,b){var c=1-(1-a*a)/(2*a)*Math.log((1-a)/(1+a));if(Math.abs(Math.abs(b)-c)<1e-6)return b<0?-1*Cb:Cb;for(var d,e,f,g,h=Math.asin(.5*b),i=0;i<30;i++)if(e=Math.sin(h),f=Math.cos(h),g=a*e,d=Math.pow(1-g*g,2)/(2*f)*(b/(1-a*a)-e/(1-g*g)+.5/a*Math.log((1-g)/(1+g))),h+=d,Math.abs(d)<=1e-10)return h;return NaN},ce=["cea"],de={init:Ra,forward:Sa,inverse:Ta,names:ce},ee=["Equirectangular","Equidistant_Cylindrical","eqc"],fe={init:Ua,forward:Va,inverse:Wa,names:ee},ge=20,he=["Polyconic","poly"],ie={init:Xa,forward:Ya,inverse:Za,names:he},je=["New_Zealand_Map_Grid","nzmg"],ke={init:$a,forward:_a,inverse:ab,names:je},le=["Miller_Cylindrical","mill"],me={init:bb,forward:cb,inverse:db,names:le},ne=20,oe=["Sinusoidal","sinu"],pe={init:eb,forward:fb,inverse:gb,names:oe},qe=["Mollweide","moll"],re={init:hb,forward:ib,inverse:jb,names:qe},se=["Equidistant_Conic","eqdc"],te={init:kb,forward:lb,inverse:mb,names:se},ue=["Van_der_Grinten_I","VanDerGrinten","vandg"],ve={init:nb,forward:ob,inverse:pb,names:ue},we=["Azimuthal_Equidistant","aeqd"],xe={init:qb,forward:rb,inverse:sb,names:we},ye=["ortho"],ze={init:tb,forward:ub,inverse:vb,names:ye},Ae=function(proj4){proj4.Proj.projections.add(Yc),proj4.Proj.projections.add(gd),proj4.Proj.projections.add(kd),proj4.Proj.projections.add(qd),proj4.Proj.projections.add(sd),proj4.Proj.projections.add(ud),proj4.Proj.projections.add(wd),proj4.Proj.projections.add(yd),proj4.Proj.projections.add(Ad),proj4.Proj.projections.add(Kd),proj4.Proj.projections.add(Xd),proj4.Proj.projections.add($d),proj4.Proj.projections.add(ae),proj4.Proj.projections.add(de),proj4.Proj.projections.add(fe),proj4.Proj.projections.add(ie),proj4.Proj.projections.add(ke),proj4.Proj.projections.add(me),proj4.Proj.projections.add(pe),proj4.Proj.projections.add(re),proj4.Proj.projections.add(te),proj4.Proj.projections.add(ve),proj4.Proj.projections.add(xe),proj4.Proj.projections.add(ze)};return K.defaultDatum="WGS84",K.Proj=z,K.WGS84=new K.Proj("WGS84"),K.Point=Point,K.toPoint=vc,K.defs=i,K.transform=H,K.mgrs=Fc,K.version=Gc,Ae(K),K});
\ No newline at end of file
diff --git a/geoprism-web/src/main/webapp/net/geoprism/MapFactoryWebGL.js b/geoprism-web/src/main/webapp/net/geoprism/MapFactoryWebGL.js
index 777e7dbda..5c5f38e49 100644
--- a/geoprism-web/src/main/webapp/net/geoprism/MapFactoryWebGL.js
+++ b/geoprism-web/src/main/webapp/net/geoprism/MapFactoryWebGL.js
@@ -334,6 +334,46 @@
"filter": ["==", "name", ""] // hide all features in the layer
});
}
+ // Handle line layers
+ else if (layerName.indexOf("line") !== -1){
+
+ // add the main layer
+ map.addLayer({
+ "id": layerName,
+ "source": source.name,
+ "source-layer": layer.layer,
+ "type": "line",
+ "layout": {
+ "line-join": "round",
+ "line-cap": "round"
+ },
+ "paint": {
+ "line-color": styleObj.fill,
+ "line-width": styleObj.strokeWidth
+ }
+ });
+
+ // add labels
+ map.addLayer({
+ "id": layerName + "-label",
+ "source": source.name,
+ "source-layer": layer.layer,
+ "type": "symbol",
+ "symbol-placement":"line",
+ "paint": {
+ "text-color": "black",
+ "text-halo-color": "#fff",
+ "text-halo-width": 2
+ },
+ "layout": {
+ "text-field": "{displayLabel}",
+ "text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"],
+ "text-offset": [0, 0.6],
+ "text-anchor": "top",
+ "text-size": 12
+ }
+ });
+ }
else if (layerName.indexOf("multipolygon") !== -1){
if(layer.is3d){
@@ -642,10 +682,14 @@
}
},
- getAllVectorLayers : function() {
+ getAllVectorLayers : function(layers) {
var map = this.getMap();
var layersArr = [];
var layersList = this.LAYERS_LIST;
+ if (layers != null)
+ {
+ layersList = layers;
+ }
if(layersList.length > 0){
layersList.forEach(function(layerName){
@@ -720,16 +764,24 @@
},
- zoomToExtentOfFeatures : function(entities) {
+ zoomToExtentOfFeatures : function(entities, layers) {
var map = this.getMap();
var that = this;
- var layersArr = this.getAllVectorLayers();
+ var layersArr = this.getAllVectorLayers(layers);
var fullExt = null;
var bounds = new mapboxgl.LngLatBounds();
var featureGeoIds = [];
+ var featureIds = [];
entities.forEach(function(ent){
- featureGeoIds.push(ent.geoId);
+ if (typeof ent === 'string' || ent instanceof String)
+ {
+ featureIds.push(ent);
+ }
+ else
+ {
+ featureGeoIds.push(ent.geoId);
+ }
})
if(layersArr.length > 0){
@@ -738,16 +790,13 @@
if(layer){
var layerSourceName = layer.source;
- // TODO: replace _data with map.querySourceFeatures(layerSourceName);
-// var layerSourceData = map.getSource(layerSourceName)._data;
var layerSourceData = map.querySourceFeatures(layerSourceName, {
sourceLayer: layer.sourceLayer
});
-
if(layerSourceData && layerSourceData.length > 0){
layerSourceData.forEach(function(f){
- if(that.arrayContainsString(featureGeoIds, f.properties.geoId)){
+ if(that.arrayContainsString(featureGeoIds, f.properties.geoId) || that.arrayContainsString(featureIds, f.properties.featureId)){
var bbox = turf.extent(f);
bounds.extend([bbox[0], bbox[1]], [bbox[2], bbox[3]]);
}
@@ -781,6 +830,41 @@
},
+ zoomToExtent : function(bounds) {
+ var map = this.getMap();
+
+ if(typeof bounds === "string"){
+ bounds = JSON.parse(bounds);
+ }
+
+ // convert to 3857
+// if(bounds.srid === "4326"){
+// var swProj = proj4("EPSG:4326", "EPSG:3857", [bounds.sw.lng, bounds.sw.lat]);
+// var neProj = proj4("EPSG:4326", "EPSG:3857", [bounds.ne.lng, bounds.ne.lat]);
+// var sw = new mapboxgl.LngLat(swProj[0], swProj[1]);
+// var ne = new mapboxgl.LngLat(neProj[0], neProj[1]);
+// }
+// else{
+// var sw = new mapboxgl.LngLat(bounds.sw.lng, bounds.sw.lat);
+// var ne = new mapboxgl.LngLat(bounds.ne.lng, bounds.ne.lat);
+// }
+
+ var sw = new mapboxgl.LngLat(Number(bounds.sw.lng), Number(bounds.sw.lat));
+ var ne = new mapboxgl.LngLat(Number(bounds.ne.lng), Number(bounds.ne.lat));
+
+ var bbox = new mapboxgl.LngLatBounds(sw, ne);
+
+ if(map.loaded()){
+ map.fitBounds(bbox, {padding:50, linear:true});
+ }
+ else{
+ map.on('load', function () {
+ map.fitBounds(bbox, {padding:50, linear:true});
+ });
+ }
+ },
+
+
addVectorClickEvents : function(featureClickCallback, layerz)
{
this._clicks = this._clicks || {};
diff --git a/geoprism-web/src/main/webapp/net/geoprism/css/data-uploader.css b/geoprism-web/src/main/webapp/net/geoprism/css/data-uploader.css
index 56a530aee..03caf6083 100755
--- a/geoprism-web/src/main/webapp/net/geoprism/css/data-uploader.css
+++ b/geoprism-web/src/main/webapp/net/geoprism/css/data-uploader.css
@@ -63,6 +63,7 @@
.location-selector-container .cell .fa.fa-pencil.ico-edit,
.location-selector-container .cell .fa.fa-trash-o.ico-remove,
.location-field-info-card .cell .fa.fa-pencil.ico-edit,
+.location-field-info-card .cell .fa.fa-link.ico-synonym,
.location-field-info-card .cell .fa.fa-trash-o.ico-remove{
font-size: 20px;
}
diff --git a/geoprism-web/src/main/webapp/net/geoprism/data/browser/LocationManagement.js b/geoprism-web/src/main/webapp/net/geoprism/data/browser/LocationManagement.js
index f0c259b30..66e6ba545 100644
--- a/geoprism-web/src/main/webapp/net/geoprism/data/browser/LocationManagement.js
+++ b/geoprism-web/src/main/webapp/net/geoprism/data/browser/LocationManagement.js
@@ -178,6 +178,22 @@
});
}
+ controller.viewSynonyms = function(entity) {
+ var connection = {
+ elementId : '#innerFrameHtml',
+ onSuccess : function(synonyms) {
+ $scope.$emit('locationSynonymEdit', {
+ universal : $scope.universal,
+ parent : $scope.entity,
+ entity : entity,
+ synonyms: synonyms
+ });
+ }
+ };
+
+ locationService.viewSynonyms(connection, entity.id);
+ }
+
controller.remove = function(entity) {
var title = localizationService.localize("location.management", "removeOptionTitle", "Delete location");
@@ -333,6 +349,123 @@
controller.init();
}
+ function LocationSynonymModalController($scope, $rootScope, locationService) {
+ var locationController = controller;
+ var controller = this;
+
+ controller.init = function() {
+ $scope.show = false;
+ controller.deletedSyns = [];
+ }
+
+ controller.newSynonym = function() {
+ $scope.synonyms.push({
+ displayLabel: "",
+ id: Mojo.Util.generateId(),
+ type: "com.runwaysdk.system.gis.geo.Synonym"
+ });
+ }
+
+ controller.removeSynonym = function(synonym) {
+ var removeIndex = null;
+
+ for (var i = 0; i < $scope.synonyms.length; ++i)
+ {
+ if ($scope.synonyms[i].id === synonym.id)
+ {
+ removeIndex = i;
+ break;
+ }
+ }
+
+ if (removeIndex !== null)
+ {
+ $scope.synonyms.splice(removeIndex, 1);
+ controller.deletedSyns.push(synonym.id);
+ }
+ }
+
+ controller.load = function(data) {
+ if(data.entity == null) {
+ $scope.entity = {
+ type : 'com.runwaysdk.system.gis.geo.GeoEntity',
+ wkt : data.wkt,
+ universal : data.universal.value
+ };
+ }
+ else {
+ $scope.entity = data.entity;
+ }
+
+ $scope.synonyms = data.synonyms;
+ $scope.universals = data.universal.options;
+ $scope.parent = data.parent;
+ $scope.show = true;
+ }
+
+ controller.clear = function() {
+ $scope.entity = undefined;
+ $scope.parent = undefined;
+ $scope.show = false;
+ $scope.synonyms = [];
+ controller.deletedSyns = [];
+ }
+
+ controller.cancel = function() {
+ var connection = {
+ elementId : '#innerFrameHtml',
+ onSuccess : function(entity) {
+ controller.clear();
+
+// $scope.$emit('locationCancel', {});
+ },
+ onFailure : function(e){
+ $scope.errors.push(e.localizedMessage);
+ }
+ };
+
+ $scope.errors = [];
+
+ var synIds = [];
+ for (var i = 0; i < $scope.synonyms.length; ++i)
+ {
+ var id = $scope.synonyms[i].id;
+
+ if (id.length === 64)
+ {
+ synIds.push(id);
+ }
+ }
+
+ locationService.cancelEditSynonyms(connection, synIds);
+ }
+
+ controller.apply = function() {
+ var connection = {
+ elementId : '#innerFrameHtml',
+ onSuccess : function(entity) {
+
+ controller.clear();
+
+// $scope.$emit('locationReloadCurrent');
+ },
+ onFailure : function(e){
+ $scope.errors.push(e.localizedMessage);
+ }
+ };
+
+ $scope.errors = [];
+
+ locationService.applySynonyms(connection, { "parent" : $scope.entity.id, "synonyms" : $scope.synonyms, "deleted" : controller.deletedSyns });
+ }
+
+ $rootScope.$on('locationSynonymEdit', function(event, data) {
+ controller.load(data);
+ });
+
+ controller.init();
+ }
+
function LocationModalController($scope, $rootScope, locationService) {
var locationController = controller;
var controller = this;
@@ -437,10 +570,26 @@
link: function (scope, element, attrs, ctrl) {
}
}
- }
+ }
+
+ function LocationSynonymModal() {
+ return {
+ restrict: 'E',
+ replace: true,
+ templateUrl: com.runwaysdk.__applicationContextPath + '/partial/data/browser/location-synonym-modal.jsp',
+ scope: {
+ layers : '='
+ },
+ controller : LocationSynonymModalController,
+ controllerAs : 'ctrl',
+ link: function (scope, element, attrs, ctrl) {
+ }
+ }
+ }
angular.module("location-management", ["location-service", "styled-inputs", "editable-map-webgl", "widget-service", "localization-service"]);
angular.module("location-management")
.controller('LocationController', LocationController)
.directive('locationModal', LocationModal)
+ .directive('locationSynonymModal', LocationSynonymModal)
})();
diff --git a/geoprism-web/src/main/webapp/net/geoprism/service/LocationService.js b/geoprism-web/src/main/webapp/net/geoprism/service/LocationService.js
index 5d4e6db2e..61d4599ae 100644
--- a/geoprism-web/src/main/webapp/net/geoprism/service/LocationService.js
+++ b/geoprism-web/src/main/webapp/net/geoprism/service/LocationService.js
@@ -75,6 +75,18 @@
runwayService.execute(req, connection);
}
+ service.applySynonyms = function(connection, data) {
+ var req = {
+ method: 'POST',
+ url: com.runwaysdk.__applicationContextPath + '/location/applyEditSynonyms',
+ data : {
+ synonyms : data
+ }
+ }
+
+ runwayService.execute(req, connection);
+ }
+
service.openEditingSession = function(connection, config) {
var req = {
method: 'POST',
@@ -87,6 +99,18 @@
runwayService.execute(req, connection);
}
+ service.cancelEditSynonyms = function(connection, synonyms) {
+ var req = {
+ method: 'POST',
+ url: com.runwaysdk.__applicationContextPath + '/location/cancelEditSynonyms',
+ data : {
+ synonyms : synonyms
+ }
+ }
+
+ runwayService.execute(req, connection);
+ }
+
service.cancelEditingSession = function(connection, config) {
var req = {
method: 'POST',
@@ -123,6 +147,18 @@
runwayService.execute(req, connection);
}
+ service.viewSynonyms = function(connection, entityId) {
+ var req = {
+ method: 'POST',
+ url: com.runwaysdk.__applicationContextPath + '/location/viewSynonyms',
+ data : {
+ entityId : entityId
+ }
+ }
+
+ runwayService.execute(req, connection);
+ }
+
service.unlock = function(connection, entityId) {
var req = {
method: 'POST',
diff --git a/geoprism-web/src/main/webapp/net/geoprism/service/WebGLMapService.js b/geoprism-web/src/main/webapp/net/geoprism/service/WebGLMapService.js
index 7165fe7cb..e0dabe69b 100644
--- a/geoprism-web/src/main/webapp/net/geoprism/service/WebGLMapService.js
+++ b/geoprism-web/src/main/webapp/net/geoprism/service/WebGLMapService.js
@@ -90,6 +90,10 @@
this.clearOverlays(); // the popup doesn't shift appropriately to the new position so clear it
}
+ service.zoomToExtent = function(bounds) {
+ service.map.zoomToExtent(bounds);
+ }
+
service.getWebGlMap = function() {
return service.map.getMap();
}
@@ -165,8 +169,8 @@
service.map.focusOffFeature(feature);
}
- service.zoomToExtentOfFeatures = function(featureGeoIds) {
- service.map.zoomToExtentOfFeatures(featureGeoIds);
+ service.zoomToExtentOfFeatures = function(featureGeoIds, layers) {
+ service.map.zoomToExtentOfFeatures(featureGeoIds, layers);
}
service.toggleBaseLayer = function(targetLayer, toggleOffLayer) {
diff --git a/geoprism-web/src/main/webapp/net/geoprism/widgets/EditableMapWebGL.js b/geoprism-web/src/main/webapp/net/geoprism/widgets/EditableMapWebGL.js
index 79157da4f..39680f281 100644
--- a/geoprism-web/src/main/webapp/net/geoprism/widgets/EditableMapWebGL.js
+++ b/geoprism-web/src/main/webapp/net/geoprism/widgets/EditableMapWebGL.js
@@ -337,7 +337,6 @@
})
}
}
- controller._updatedGeos = {};
var deletedGeos = Object.keys(controller._deletedGeos);
for (var i = 0; i < deletedGeos.length; ++i)
@@ -355,6 +354,9 @@
onSuccess : function(data) {
controller._isEditing = false;
+ controller._updatedGeos = {};
+ controller._deletedGeos = {};
+
controller._geoprismEditingControl.stopEditing();
map.setFilter("target-multipolygon", [ "!=", "id", "" ]);
diff --git a/geoprism-web/src/main/webapp/net/geoprism/widgets/SimpleMapWebGL.js b/geoprism-web/src/main/webapp/net/geoprism/widgets/SimpleMapWebGL.js
index bcb9ee920..73dbb0c90 100644
--- a/geoprism-web/src/main/webapp/net/geoprism/widgets/SimpleMapWebGL.js
+++ b/geoprism-web/src/main/webapp/net/geoprism/widgets/SimpleMapWebGL.js
@@ -18,159 +18,169 @@
*/
(function(){
function SimpleMapWebGLController($scope, $rootScope, localizationService, webGLMapService, locationService, $sce, $compile) {
- var controller = this;
-
- $scope.renderBase = true;
- $scope.baseLayers = [];
- $scope.contextStyle = {fill:"rgba(0, 0, 0, 0.25)", strokeColor:"rgba(0, 0, 0, 0.75)", strokeWidth:5, radius:7};
- $scope.targetStyle = {fill:"rgba(161, 202, 241, 0.80)", strokeColor:"rgba(102, 102, 102, 0.80)", strokeWidth:2, radius:7};
- $scope.sharedGeoData = {};
-
-
- controller.init = function() {
-
- }
-
- controller.hoverCallback = function(featureId){
-
- var isMobile = false; //initiate as false
- // device detection
- if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
- || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))){
-
- $scope.$emit('locationFocus', {
- id : featureId
- });
- $scope.$apply();
-
- }
- else{
- $scope.$emit('hoverChange', {
- id : featureId
- });
- $scope.$apply();
- }
- }
-
- controller.featureClickCallback = function(feature, map){
- $scope.$emit('locationFocus', {
- id : feature.properties.id
- });
- $scope.$apply();
- }
-
-
- controller.baseLayerPanelMouseOut = function() {
- $scope.showBaseLayerPanel = false;
- }
-
- controller.toggleBaseLayer = function(targetLayer) {
- $scope.baseLayers.forEach(function(lyr){
- if(lyr.layerId === targetLayer.layerId){
- webGLMapService.toggleBaseLayer(lyr, $scope.activeBaseLayer);
- $scope.activeBaseLayer = targetLayer;
- }
- });
- }
-
- controller.removeVectorData = function() {
- webGLMapService.removeAllVectorLayers();
- }
-
- controller.getMapData = function(callback, data, workspace) {
- webGLMapService.getGeoJSONData(callback, data, workspace);
- }
-
- controller.addVectorClickEvents = function(featureClickCallback, layersArr) {
- webGLMapService.addVectorClickEvents(featureClickCallback, layersArr);
- }
-
- controller.addVectorHoverEvents = function(hoverCallback, layersArr) {
- webGLMapService.addVectorHoverEvents(hoverCallback, layersArr);
- }
-
- controller.zoomToLayersExtent = function(layersArr) {
- webGLMapService.zoomToLayersExtent(layersArr);
- }
-
- controller.zoomToExtentOfFeatures = function(featureGeoIds) {
- webGLMapService.zoomToExtentOfFeatures(featureGeoIds);
- }
-
- controller.focusOnFeature = function(feature) {
- webGLMapService.focusOnFeature(feature);
- }
-
- controller.focusOffFeature = function(feature) {
- webGLMapService.focusOffFeature(feature);
- }
-
- controller.updateVectorLayer = function(source, layers) {
- webGLMapService.updateVectorLayer(source, layers);
- }
-
-
- controller.refreshBaseLayer = function() {
- if($scope.baseLayers.length > 0) {
- for(var i = 0; i < $scope.baseLayers.length; i++) {
- var layer = $scope.baseLayers[i];
-
- if(layer.isActive) {
- webGLMapService.showLayer(layer, 0);
- }
- else {
- webGLMapService.hideLayer(layer);
- }
- }
- }
- }
-
- // TODO: This has legacy code. verify that IF this is being used it's doing as expected.
- // Otherwise remove it.
- controller.refreshInteractiveLayers = function(triggeringEvent) {
- console.log("SimpleMapWebGL::RefreshInteractiveLayers")
- if(!isEmptyJSONObject($scope.sharedGeoData)){
- var data = $scope.sharedGeoData;
-
- var geomType;
- for(var l=0; l 0) {
+ for(var i = 0; i < $scope.baseLayers.length; i++) {
+ var layer = $scope.baseLayers[i];
+
+ if(layer.isActive) {
+ webGLMapService.showLayer(layer, 0);
+ }
+ else {
+ webGLMapService.hideLayer(layer);
+ }
+ }
+ }
+ }
+
+ // TODO: This has legacy code. verify that IF this is being used it's doing as expected.
+ // Otherwise remove it.
+ controller.refreshInteractiveLayers = function(triggeringEvent) {
+ console.log("SimpleMapWebGL::RefreshInteractiveLayers")
+ if(!isEmptyJSONObject($scope.sharedGeoData)){
+ var data = $scope.sharedGeoData;
+
+ var geomType;
+ for(var l=0; l
-->
-
-
+ ">
+ ">
+ ">
@@ -88,5 +89,6 @@
-
+
+
diff --git a/geoprism-web/src/main/webapp/partial/data/browser/location-synonym-modal.jsp b/geoprism-web/src/main/webapp/partial/data/browser/location-synonym-modal.jsp
new file mode 100644
index 000000000..0eddba4e5
--- /dev/null
+++ b/geoprism-web/src/main/webapp/partial/data/browser/location-synonym-modal.jsp
@@ -0,0 +1,100 @@
+<%--
+
+ Copyright (c) 2015 TerraFrame, Inc. All rights reserved.
+
+ This file is part of Runway SDK(tm).
+
+ Runway SDK(tm) is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Runway SDK(tm) is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Runway SDK(tm). If not, see .
+
+--%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="/WEB-INF/tlds/geoprism.tld" prefix="gdb"%>
+
+