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)

1
vote
2answers
1k views

OpenLayers vector does not draw (or re-draw) on zoom level change or layerswitcher off/on

Here is the full code (i'll highlight the important parts after): jQuery(document).ready(function($) { // ...
0
votes
1answer
11 views

Assigning OpenLayers Layers to different layer trees 'automatically'

I am developing an OpenLayers 3 web application were I would like to incorporate multiple layer selectors. Instead of manually adding each layer to a layer selector I would like to do it using the ...
2
votes
1answer
58 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 ...
1
vote
2answers
275 views

Javascript + ESRI + Dropdown menu with layers

Dear people of stackoverflow, I have a script that generates a basemap with a layer that I have put on top of it. I am trying to create a dropdown menu in which the user of my HTML5 page can select ...
15
votes
7answers
8k views

Pure JavaScript Library for Geometry Operations

Does anyone know of a pure JavaScript library for doing geometry operations such as buffer, union, intersects, etc? I want to play with doing these operations in the browser. It looks like ...
1
vote
0answers
16 views

Shared edge between two geojson polygons

I am interested in getting the coordinates of a shared edge (if exists) between two geojson polygons. I am (currently) using turfjs and geojson-equality libraries I tried this but I consider it quite ...
4
votes
1answer
209 views

How can I select a feature in Openlayers 3 by right click it?

I'm trying to selete / delete a feature by right click it on Openlayers 3. I know I have map events singleclick/click/dblclick and I also know I can use the ol.interaction.Select for delete. In ...
0
votes
1answer
18 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 ...
0
votes
0answers
13 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 ...
2
votes
1answer
16 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 ...
0
votes
2answers
139 views

Adding KML layers to ArcGIS JS API v4 (beta)?

I have been building a web application using ArcGIS JS API v4.0.Beta1. I am having difficulties finding out how to add KML layers to the scene. How do I add the KMLs? I have tried adding a new feature ...
1
vote
1answer
2k views

OpenLayers - Show a WMS Layer from GeoServer

I'm trying to acesses with OpenLayers code an example of the embedded GeoServer map (the map of tasmania), which acts as a local server on my machine. However, every time I open the .html, the map ...
3
votes
2answers
201 views

Geocode an address and then buffer

I have a script which geocode an address and buffer that address by 1, 5 and 10 mile radius. The problem I am having is that the address on the map shows 4 different points not sure what's causing it. ...
0
votes
0answers
11 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
416 views

how to disable duplicate items in the legend for ArcGIS JavaScript API

I have a problem with duplicate items in the legend panel! Can anyone help me? This is my feature Layer with popup info: // Feature Layer var msFeatureLayer = new ...
0
votes
1answer
41 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 ...
0
votes
1answer
1k views

OpenLayers create marker (feature with icon) from WKT

I have a point object WKT. Like this: POINT (25.04568 48.221548). Also I have an icon in my project folder. My goal is to show on a map an icon that represents a feature. Can it be just a normal ...
2
votes
1answer
15k views

Uncaught SyntaxError: Unexpected token : when using ajax

I try to call json data from geoserver, but when i try to run it in chrome, it return this following error "Uncaught SyntaxError: Unexpected token :" This is my code, function ...
2
votes
1answer
11k views

Zoom Change Event Listener with google maps api

I'm trying to create an event listener that turns off a google fusion layer once the map is zoomed in to a certain level. I'm pretty new to javascript and its google maps api, so any help is ...
2
votes
1answer
13 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
21 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
31 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 ...
8
votes
4answers
3k views

CORS issue ArcGIS 10.1 IIS (Cross Origin Resource Sharing)

I have ArcGIS 10.1 installed with the web adapter for IIS. I've added a config file to the root of IIS7 to enable Cross Origin Resource Sharing (CORS) as per this page. I've pushed the cors enabled ...
0
votes
1answer
349 views

Placing GeoServer WMS layer within OpenLayers 3

I have the following basic OpenLayers 3 code that opens a OSM background mapping and this works fine: <!doctype html> <html> <head> <title>Hello PMS</title> ...
0
votes
1answer
346 views

How to add WMS Layer from Mapserver( localhost) on Cesium Globe?

I am trying to add WMS layer from mapserver i.e. from localhost on Cesium Globe with the following HTML code. But I am not able to load or connect Cesium with the Mapserver and nothing is displayed on ...
3
votes
2answers
364 views

Google Maps need to click twice to get marker click event to trigger

I have a google map that I am populating with real estate listings from a database. I have set it up to refresh the listings when the map is panned or zoomed. I am using the dragend & ...
0
votes
1answer
148 views

google.maps.InfoWindow is not working

If anyone encountered the same problem and come up with the solution please give me an idea if what's wrong with this code. The InfoWindow is not working when i click the map polygon. All parts ...
3
votes
1answer
170 views

How to create an exact tracking route from GPS data with animated icon?

Probably this is not purely GIS related question, its related to developing issues. I am just asking if there is any kind of suggestions from Gurus. I am building an tracking application where GPS ...
4
votes
2answers
171 views

tabbed popup window for Arcgis Javascript

Anyone know examples of a tabbed popup window for Arcgis for javascript, NOT an infowindow? If you could point me in the the right direction it would help.
1
vote
1answer
253 views

ArcGIS javascript API setDefinitionExpression returns wrong result set

New to GIS and ArcGIS. I am trying to use the javascript API setDefinitionExpression to limit the output of a FeatureLayer on the map; however, the result set returned by the function is incorrect. ...
1
vote
1answer
25 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) { ...
0
votes
2answers
41 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
25 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
14 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
24 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 ...
0
votes
1answer
89 views

Multiple GeoJSON Layers

I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I have ...
1
vote
2answers
22 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. ...
0
votes
0answers
10 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 ...
2
votes
2answers
359 views

Openlayers map WMS stretched by latitude

I am working on a small javascript application for displaying map with WMS layers from 2 servers. The problem is, that image is stretched by latitude, it is wider, as it should be. This is is how it ...
2
votes
1answer
373 views

OpenLayers - cannot set layer opacity

I have the following problem: by default, you can simply change the opacity of layer by writing for example: layer.setOpacity(0.3); But when I add it to my map SelectFeature controls, my layer is ...
0
votes
1answer
194 views

OpenLayers Drag&Drop a pin to select position?

Is there an OpenLayers example that allows the user to set a position with drag&drop. I would like to have a pin and set the position after the user drags & drops the pin to a new position.
0
votes
1answer
53 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 ...
1
vote
1answer
232 views

Google Hybrid Map tiles won't load in OpenLayers when centered on certain position

Since the Google Maps API update to V3.2 (17 Feb 2015) our maps have not been loading to their initial state, centered over the Gulf of Mexico. When the center location is: center: new ...
0
votes
3answers
104 views

Mapbox Geocoding and Markers

I recently added Mapbox's Geocoder Control and it works wonderfully. I was wondering if anyone could tell me how I could have a marker appear at the location of the address that was searched for? ...
2
votes
3answers
2k views

ESRI proxy page not working properly + CORS + cross domain scripting

I have set up a proxy page. I am using jsp version of proxy page. I have set up a server URL which will point to my Java. When I load the my page which the proxy URL has set in its html it will work ...
1
vote
1answer
164 views

How to add custom basemaps to BasemapGallery

I would like to add my own custom basemaps to the BasemapGallery. Is there any way I can create my own BasemapGallery with only my maps? I am using the ArcGIS API for javascript. EDIT: for clarity I ...
5
votes
2answers
2k views

Layer loadstart & loadend events in OpenLayers 3

OpenLayers 2 has these layer events "loadstart & loadend." What is equivalent to them in OpenLayers 3? While a vector layer loads and is rendered, I need to show a loading icon.
0
votes
0answers
7 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
0answers
23 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
1answer
35 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 ...