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
1answer
42 views

Update mouseover information with baselayerchange on leaflet map

On leaflet map I use baselayerchange in order to change the legend box and the info popup on rollover. The legend change works perfectly but I have a problem with the infobox (name info0/info1...), I ...
2
votes
0answers
34 views

Check/uncheck overlays in groupedlayercontrol.js

In a Leaflet-based app I have create several overlays, grouped with leaflet.groupedlayercontrol.js, as shown in this image: Everything works well, but I need to uncheck certain layers, allowing the ...
1
vote
0answers
32 views

How to emulate OpenLayers button click in C#

I'm trying to call a click of a user using C # with the following code ( " C # : GeckoWebBrowser.Navigate ( javascript : void ( Document.getElementById ( ' idOfElement ' ) .click ( ) ) " ) ; ...
1
vote
1answer
71 views

Why do I have to reload the page, to show the Map correctly?

I added a map, in the way I'm supposed to, but why do I have to reload/refresh the page, to get the map (almost) as I want to? This is, what I mean: Map before reloading the page: Map after ...
2
votes
1answer
73 views

OpenLayers 3 measure example

Here is my fiddle, which is exact copy of Openlayers 3 measure example. What am I doing wrong when my fiddle isn't working? I can't see the blue dot to start measuring my path or area (same problem ...
1
vote
0answers
42 views

InfoWindows in Nested Polygons (Google Maps Api 3)

I have a large polygon with thick borders inside which there are several smaller polygons something like multiple city polygons inside a state border. The problem with this is that the info-windows ...
2
votes
1answer
582 views

set infoTemplate for various graphics in graphics layer in loop

I am successful at getting an info window pop up on the event click of a marker on a map. Now, what I'm having trouble with is passing unique information for each graphic in the loop to the individual ...
0
votes
1answer
44 views

different browsers referencing different css files, arcgis javascript cmv

When I open a page in chrome, and click on a feature the popup style is coming from one css file, and when I do the same thing in firefox, the popup looks completely different and is referencing a ...
0
votes
1answer
63 views

Highlight polygon on hover and click in TileMill

I have created a MapBox.js map with several layers of polygons each with hover/click interactivity to show attributes about each polygon. I want the polygons to become highlighted upon a user ...
1
vote
1answer
73 views

Leaflet - how do you get individual markers from a featurelayer?

In Leaflet, if I have a feature layer filled with markers, how do I get these markers back from the layer? I want to apply different popups to each individual marker, instead of the entire set. I ...
0
votes
0answers
10 views

Restrict legend to map bounds in CartoDB.js

Does anyone know how to restrict legend content based on map bounds in CartoDB.js? I am building a large, complicated legend and I would like it to only display visible features to reduce complexity. ...
1
vote
1answer
70 views

Configurable Map Viewer (CMV) - Content Pane with CMV

I’m upgrading from the old viewer to the new CMV version. Is there a better way for handling a content pane in the sidebar under the new format? In the previous version I did it thru the controller, ...
1
vote
1answer
402 views

CartoDB.js - Accessing table fields in hover function

I am new to CartoDB.js and javascript in general, and I am attempting to highlight polygons in response to a mouse hover. My plan of attack attempts to utilize one of the interesting templates ...
1
vote
1answer
52 views

Coloring polygon based on date using TileMill/CartoDB?

How would you color a polygon/line/dot based on a date? The colors would be a pre-set list. I need the area to update its color based on the current (or given) date. I would be using tilemill or ...
0
votes
0answers
17 views

Problem with displaying a route in EU, method works in USA

could anyone help me with my code to create a route between two directions in Germany? According to instructions I am creating a route task and setup parameters: map.addLayer(new ...
2
votes
1answer
186 views

How do I plot a line on a map, or obtain the latitude and longitude coordinates of such a line, that is 120km north of the US-Canada border?

How do I plot a line on a map, or obtain the latitude and longitude coordinates of such a line, that is 120km north of the US-Canada border, including parts of the border that cross water? (I managed ...
1
vote
2answers
89 views

How to use same info window setup for more than one layer with identify, arcgis javascript api, cmv template

I am new to javascript and am playing around with customizing the CMV template https://github.com/cmv/cmv-app. I am trying to customize my info windows for my layers, and have had some luck modifying ...
0
votes
0answers
18 views

Jquery slider cycling through swipable layers - getting a bug

I'm building a tool that allows the visitor to cycle through rendered maps of low and high emission climate data projections. The high and low sets by themselves work great, but when I am using the ...
2
votes
1answer
122 views

How to get layer type in OpenLayers 3?

I would like to iterate through all of the added layers in an ol.Map instance and only select the vector layers. So far I could get the individual layers with the a property of the resulting object of ...
5
votes
2answers
436 views

How do the equations/algorithms behind buffering tools actually work?

I've been wondering how the equations/algorithms behind buffering tools actually work?
0
votes
0answers
31 views

Leaflet.EasyButton toggle

I am attempting to incorporate Leaflet.EasyButton into an application. While I am able to drop it in and call a function I would like it to toggle on/off. right now it is loading an inner.HTML div ...
1
vote
1answer
79 views

Converting GPS cords to X Y based on wrapper

I'm trying to create some software for an airport and they require me to place icons of aircraft in their position based on GPS. I have 10x10 tiles each tile being 256x256 pixels and the origin point ...
0
votes
1answer
52 views

How to style specific polygons from a geojson with Leaflet

I have a World Countries geojson, that has country codes as "ID" (feature.id) and names as feature.properties.name I would like to color specific countries for making a "countries visited" map. ...
1
vote
1answer
124 views

Custom ordering/z-index of icons in Leaflet layer

I have a single layer (points) with a bunch of markers. Each point has an attribute that is regularly updated. I understand by Leaflet sorts the layers such that those lower in latitude are on top for ...
0
votes
0answers
206 views

How to create dynamic legend for multiply layers with leaflet.js?

I want to create multiple choropleth maps which displays different statistical data with leaflet.js. So it would be nice to show different legends for each map. I create such legends for two layers ...
1
vote
2answers
1k views

Javascript library for converting MGRS to Lat/Lng

Is there a JS library that converts MGRS to LL? I have found one that converts Lat/Lng to MGRS, but nothing that converts MGRS to Lat/Lng. Someone asked this question in the past, but the answer was ...
1
vote
1answer
117 views

How to update leaflet L.imageOverlay using jquery serialize without page refresh?

I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission. In addition, I ...
2
votes
2answers
886 views

openlayers - export map to canvas problem

I am trying to make a export control to export the map as image file. I found this example: http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/exportMapCanvas.html so i added the ...
2
votes
0answers
79 views

Comparing mapping APIs

I am planning to write a thesis about mapping APIs and compare three of them (Google Maps API, Leaflet and OpenLayers) or four, if you consider OL2 and OL3 as different APIs. I am planning to make 3 ...
1
vote
2answers
412 views

ESRI JS API - How to get event object from Draw Toolbar onDrawEnd

I am using the Draw Toolbar in the Esri Javascript API v3.4 and connecting to the onDrawEnd event using aspect.after(drawingToolbar, "onDrawEnd", drawEndHandleFunction, true); I am using the Draw ...
3
votes
1answer
389 views

Does leaflet support KML Ground Overlays?

I found an example showing KML overlays at http://harrywood.co.uk/maps/examples/leaflet/kml.html but it only plots vector layer using polygons. Is there any way to plot Ground overlays of KML (like ...
1
vote
1answer
42 views

Adding multiple addresses - ArcGIS Javascript

I am trying to use ArcGIS Javascript API to add all of the service orders that are open to a map. I can get this to work with a single address, but it is not working when I try to loop through a list ...
4
votes
2answers
230 views

Editing PostGIS topology in a web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
1
vote
0answers
117 views

How to disable Google map zooming animation effect?

I am using Openlayers mapping library in my application. I have integrated Google map V3 & added other several WMS overlays, Vector layers etc. Every thing working fine. But I am facing big ...
2
votes
1answer
831 views

Is it possible to implement Geofencing in Openlayers?

We were planning to develop an application using Openlayers, which can display the incoming GPS signals as markers and create alerts , if the markers( positions) are outside a particular zone. Is ...
0
votes
2answers
194 views

How to remove roads from Google satellite hybrid map in OpenLayers?

I am trying to display Google satellite map in Openlayers. So, I added Google Satellite Hybrid map. My problem is, I need to display labels(like POI, place name etc) but don't need any roads & its ...
1
vote
2answers
315 views

How to style geojson polygon using L.mapbox.featureLayer()

I have this code: var SupIncend = L.mapbox.featureLayer().addTo(map); var ArbolesAntes = L.mapbox.featureLayer().addTo(map); var ArbolesX = L.mapbox.featureLayer().addTo(map); var ...
1
vote
0answers
29 views

view attributes from feature service and export to CSV or copy to clipboard

I have a Geo-Processing service that generates summary statistics of an area of interest. What I would like to know is; Simple method to display the data in my Webpage. Is Dgrid the recommended ...
1
vote
0answers
58 views

Printing from Feature Layer via ArcGIS API for JavaScript?

I am trying to print a map using a print service. I have followed the example on the ArcGIS site namely: https://developers.arcgis.com/javascript/jssamples/widget_print_esri_request.html However I ...
1
vote
1answer
27 views

Legend hangs with large featurelayers at startup

My problem is that I created an app with a lot of services that the user can use. The problem is that when I implement the legend widget and the code goes over startup(), the app becomes stuck and it ...
1
vote
0answers
74 views

Loading KML WMS Network Link through Google Earth API

I'm trying to add a KML network link with the Google Earth API using the same function that I have used for regular KMLs and KMZs. Sources suggest to create a KML with a "Ground Overlay" to connect to ...
3
votes
2answers
118 views

How to determine number of features in GeoJSON file using Python or JavaScript?

Is there a best way to determine the number of features in a GeoJSON file? Ideally using Python or JavaScript.
0
votes
1answer
33 views

KML Layers suddently not appearing on embedded Google map

I have an embedded map on: http://wtc.army.mil/modules/family%20and%20caregivers/sfacMap.html I am receiving the error below in different forms related to the session id/token trailing after the ...
0
votes
0answers
32 views

What would prevent ESRI JSAPI AMD modules from being cached?

I am using AMD style in the ESRI Javascript API (along with the esri application boilerplate: https://github.com/Esri/application-boilerplate-js). For some reason, the AMD modules from the ...
3
votes
1answer
120 views

Best Practice for HTML5 Geolocation with ArcGIS for Javascript API

My organization would prefer to use its own basemaps rather than those provided by ArcGIS Online due to the accuracy of information that is represented in them. The area we service is rapidly ...
2
votes
1answer
136 views

Leaflet: How do you use removeLayer?

This is driving me mad. See the Leaflet tutorial for adding a layer control to your map: L.Icon.Default.imagePath = "Scripts/images"; var mapUrl = ...
5
votes
1answer
3k views

problem adding pop-up to GeoJSON layer in Leaflet

I'm new to working with the Leaflet API and am running into trouble with creating popups for a GeoJSON layer. I've looked at the following post as a reference and am still having difficulty: binding ...
3
votes
1answer
132 views

Limits to torque and cartodb

Bit of a theoretical one this, but I was wondering if anyone had tried to use CartoDB and Torque with any big(ish) data. What I am talking about is having the location of 75,000 people at 1 minute ...
1
vote
2answers
60 views

accesing openlayers.map in index.html

I am developing an app using OpenTripPlanner. It creates an OpenLayer map in map.js. I want to access this map in index.html so I can set it's center. Kindly help me out.
1
vote
0answers
561 views

How should I make use of railway routes from Google Maps API?

I have a specific requirement wherein I have to display or highlight only railway stations in the map rather than the whole map. How can this be achieved? This is the code I tried: <html> ...