JavaScript is a prototype-based, object-oriented scripting language that is dynamic, weakly typed and has first-class functions.

learn more… | top users | synonyms (1)

0
votes
1answer
54 views

ArcGIS Portal homepage altered without html change

After changing the region in rest services the carousel of images has stopped rotating, the white banner at the top has disappeared and icons at the bottom have shifted. Seems like a page size setting ...
0
votes
1answer
51 views

Can I set a max zoom for a search in CartoDB.js

I made a map with a search box that is related to a country. Entering a postal code will zoom completly in to the asked postal code. I would like to center the map to this asked postal code, but not ...
2
votes
1answer
169 views

Cartodb add basemap switcher

I currently have a map created entirely in the CartoDB editor, including custom map. For some reason it doesn't allow you to add an attribution in the editor but thats a different problem. So my map ...
1
vote
0answers
85 views

How do you add a pop up to a Mapbox.js feature Layer

I am trying to get popups to work with a featureLayer in MapBox.js, to no avail. Here is my code: var pliOptions = '<h2>A ferry ride!<\/h2>' + '<p>Test Data<\/p>'; ...
3
votes
1answer
1k views

Submit form information from a leaflet popup to MySQL table

I have a leaflet map and I want to have the user fill out a form in a leaflet popup and upon clicking the 'submit' button - the information in the form will be inserted into my MySQL database. As a ...
2
votes
1answer
139 views

Leaflet polygon (multi polygon) to CQL equivelent

I am using leaflet with geoserver. I want to set up a CQL filter to do an intersect but having an issue with getting the geometry from leaflet polygon to cql polygon. For instance, the feature has ...
0
votes
0answers
135 views

Missing Leaflet icon with Html2canvas

I am using Html2canvas to capture images from a map viewer and Leaflet to add custom icon marker. The origin of the marker is at the top-left corner so when it is added to the map, the geographic ...
0
votes
0answers
68 views

Is there an open source API I can use to re-write javascript code for a web app that uses Esri's JS API?

Is there a way to "translate" Javascript code from a web app that depends on Esri's Javascript API into an Esri-independent web app? Also, can this be done if the app was built with Esri's Web App ...
0
votes
0answers
298 views

How to load GML to OL3?

I'm trying to load gml into openlayers3 there is the code: <html> <head> <title>Vector layer example</title> <link rel="stylesheet" href="ol3/ol.css" ...
0
votes
0answers
61 views

queryFeatures Error Timeout

I have the following scenario FeatureLayer.queryFeatures in javascript sometimes executes the query and sometimes gives Timeout exceeded. How to handle the problem? Any suggestion
0
votes
0answers
70 views

Drawing lineString in Google Earth API

I am able to draw a Polygon on the Google Earth API which is integrated in my website but i have to draw a lineString. Does anybody can help me? Here is the code i use to draw the polygon: function ...
0
votes
2answers
350 views

Leaflet MapBox addlayer

I'm newbie in coding and I'm trying to modify some downloaded GitHub code to make customized application and display my data. AddLayer function is making me desperate. I'm trying to add data from ...
0
votes
0answers
33 views

ArcGIS map breaking in the web page

We are embedding the arcGIS map in to a web page in 1/8th part of the web page in right-hand side upper corner. We are using angularjs framework to develop this portal.We are are going to draw symbols ...
1
vote
1answer
83 views

OpenLayers 3 right click event

I am trying to listen to right mouse click , i tried "rightclick" as in documentation says , but it doesn't work. Can any one say why it doesn't work ??? map.on('rightclick', function (evt) { ...
1
vote
2answers
57 views

How do I add a radius line from the center of the circle to a point on the cricle

The following code adds a circle of given radius to the graphics layer on an ArcGIS map. How can i add a line that joins center of the circle to any point on the circle to the graphics layer. ...
1
vote
0answers
153 views

Having trouble to exportmap in OpenLayer3

I'm trying to export the map, but I'm always getting the same error: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. The funny is that It works the ...
0
votes
0answers
130 views

Selecting Option of Select Tag by click event using OpenLayers?

I have an OpenLayers map which several POIs in it. Now I want, that the user can click on the POIs which starts an event where it posts the pointFeatures into Input Fields of the HTML the most of ...
0
votes
1answer
241 views

How to filter polygons in Leaflet using range slider

I have a map I'm working on with Leaflet that displays a choropleth of zip code-level data. One piece of functionality I would like to add is to allow users to use a range slider to filter out ...
2
votes
1answer
143 views

Node JS and Tilestrata to serve SRTM Tiles

Update (Aug. 16, 2015): I emailed one of the authors and it turns out that tilestrata-disk wasn't meant to be used as a "provider" in their system. No wonder! Here's what Brian Reavis said about how ...
0
votes
1answer
70 views

Having more than one Openlayers layer switcher associated to one map

I am developing an OpenLayers 3 web application were I would like to incorporate more than one Layer Tree alongside my map. I have this JSFiddle set up that it has a map with multiple layers and one ...
3
votes
1answer
81 views

mapbox - disabling viewing of unrendered white tiles outside of the map

I'm looking to disable being able to move the map in such a way that one can move outside of the map area: I don't want to be able to see the surrounding white areas when the map is dragged. I have ...
0
votes
1answer
32 views

cesium.camera.flyTo can't be called twice inside a <script> tag

Is cesium.camera.flyTo() function a deferred javascript function? I mean this function is executed only after <script> is parsed. So what if I have to call cesium.camera.flyTo() more than once ...
4
votes
1answer
82 views

Determine if point lies within shape?

What would the best method be for determining whether an address (geocoded to a lat/long point) lies within a given shape in a GIS shapefile. Best case scenario, we are given a boolean result, that we ...
0
votes
0answers
37 views

Openlayers Control.SelectFeature makes marker click listeners stop working?

I'm been having some trouble with openlayers. I have a map with several markers being added dynamically to a marker layer called markerLayer. Each marker has a click listener that opens a popup window ...
0
votes
0answers
114 views

redraw canvas when add new overlay?

Good day! A little problem: how to redraw canvas when I add overlay layer? Firstly load osm map, then creates canvas. So when I push the botton and add another layer it looks like sandwich and canvas ...
0
votes
0answers
17 views

style parameter from geoserver [duplicate]

I want to make a syle by taking field_1 parameters of geoserver this is the script var style_titik =( if (feature.get('field_6') === '4') {var b2 = new ol.style.Style({ image: new ...
1
vote
0answers
161 views

dynamic legend for tiles in Leaflet

Good day dear professionals! I have a little problem. I started to learn javascript and leaflet not so much time ago, and now I can work with layers, but creating controls that I need is to hard for ...
0
votes
2answers
74 views

Style a layer based on an attribute from geoserver in OpenLayer3

I want to take attribute from field_1 in geoserver to show at open layer 3 this is the script var style_titik =( if (feature.get('field_6') === '4') {var b2 = new ol.style.Style({ image: ...
0
votes
1answer
28 views

How to save a Polygon in an integrated Google Earth

I created a Polygon in Google Earth which is integrated in my Website. Now i have to get the KML File from this Polygon. Can anybody tell me how to do this?
1
vote
1answer
138 views

How to delete a feature in Openlayers 3.8.2 with `del` Key

I'm using OpenLayers-3.8.2 for developing a GIS application. Users draw some features and can modify all existing features on the map. They can delete features. I can delete feature as follow: user ...
0
votes
1answer
50 views

How to create folders when exporting OL to KML

I have this function that export all plotted features on my OpenLayers (2.6) map, by using the OpenLayers.Format.KML as follows: var featuresToExport = []; for (var i = 0; i < MAP.__layers.length; ...
-1
votes
1answer
300 views

What causes the Leaflet JS Providers error; Uncaught Error: No value provided for variable {time}

I am using leaflet providers and attempting to add the NASAGIBS.ViirsEarthAtNight2012 to my layer control, my other basemaps load fine; but this one doesn't and returns the following errors in the ...
0
votes
2answers
47 views

Creating a Polygon by clicking on a website embedded Google Earth

I have to create a Polygon on Google Earth which is embedded in my website as it is made in the Google Earth application. I managed to create a polygon already but i can only create it with the ...
1
vote
1answer
233 views

Pre-load tiles in OpenLayers 3

I need to preload images (.png) / tiles in my own source: new ol.source.XYZ ,which can it run fast to move and zoom in mobile devices. I used ...libs/ol3/3.7.0/ol-debug.js and as urls: urlArray ...
0
votes
2answers
160 views

Set a new SLD style in openlayers 3 for WMS request

I im triyng to submit a SLD style in openlayers 3 to change the color of my WMS(geoserver) But nothing is working...Anybody have a idea? Here is my code: var wms_p_popf = new ol.layer.Tile({ ...
4
votes
1answer
315 views

Find Intersection of Two Circle given Lat/Lon and radius

I am attempting to calculate the intersection of two circle on the Earth with a given latitude, longitude and radius. I started with this post. These circle will never be more than 100 km in diameter ...
1
vote
1answer
132 views

OpenLayers 3.7 New Server Vector WFS with GeoServer

I have recently updated from OpenLayers 3.0 to 3.7 and I noticed in the 3.5 update the Vector API has changed, I tried to alter the code as per the bottom section of code but i am getting the error ...
1
vote
0answers
88 views

Leaflet Markercluster and Timeline in sync

So I have been trying to figure how to use the markercluster and timeline plug in in sync to show a temporal animation of points. As some of the point data overlaps a cluster is needed to be able to ...
0
votes
1answer
445 views

Dynamic Layer Name - Leaflet Layer Control

I would like to have the name of a layer used by Leaflets layer control feature come from a variable instead of a string and based on data from the layer. The example shown below uses the variable ...
1
vote
1answer
54 views

How to add a polygon in Google Earth on a Website

As it is said in the title i have to add a polygon in Google Earth which is integrated in a website. I managed to integrate Google Earth in the Website, so i can view the world but i can not use any ...
0
votes
0answers
164 views

Openlayers 3 draws over other icons

I am using Openlayers 3. I made an html file witch opens map of a country in offline mode. It enables the user to draw images/segments and polygons on it. My problem is when I change the image I want ...
0
votes
1answer
151 views

Openlayers 3 bad coordinates

I am using Openlayers 3. In order to open the map i use OpenStreetMap generated tiles. When i try to get coordinates using polyFeature.getGeometry().getCoordinates() it provides me bad coordinates , ...
0
votes
1answer
78 views

OpenLayers 3 not displayed layer

Why my "OpenLayers" not displayed added layer? window.setWMS = function( WMSN ){ window._blockEvents = true; var url = WMSN[0]; var layer = WMSN[1]; var server = WMSN[2]; var wms ...
0
votes
1answer
125 views

Highlighting point using ArcGIS API for JavaScript?

How can I highlight a point using ArcGIS API for JavaScript? When I use the function of centerAndZoom, I also want to highlight this point.
0
votes
1answer
27 views

why my script does not change visible state layers?

why my script does not change visible state layers? window.setVisibleWMS = function(visible, index){ window._blockEvents = true; map.getLayers()[index].setVisible(visible); ...
0
votes
0answers
23 views

How to implement WPS functionalities from geoserver using openlayers3? [duplicate]

I am trying to build wps functionality using openlayers3. As we have seen the wps builder example in openlayers2 but no example i have seen in openlayers3. Can anyone provide me example for wps ...
0
votes
0answers
163 views

Mapbox.js: Bind dynamic popups with featureLayer?

I am building a multiple chloropleth map using v2.2.1 of Mapbox.js with featureLayer. Now I would like to add tooltips with custom content on hover event. This code is working well to set up the ...
1
vote
1answer
346 views

How to get line and polygon points from OpenLayers 3 drawing

I am working on drawing points/segments/polygons on a map that uses OpenLayers 3. The first part I have done draws points, lines and polygons. Now I am trying to retrieve the drawn coordinates in ...
0
votes
0answers
201 views

getting attributes of Openlayer Map by Javascript

I have created an OpenLayers map via the following code: var map = new ol.Map({ target: 'mapdiv', layers: [ new ol.layer.Tile({ source: new ol.source.MapQuest({layer: 'sat'}) }), new ...
1
vote
0answers
140 views

Open Layers 3 Dynamically or Batch Add Layers from user folder

I would like to dynamically load all layers (kml, for instance) from a user's folder to a group map. ...This likely requires an iteration that searches the folder and adds the layers to the users' ...