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

learn more… | top users | synonyms

116
votes
16answers
42k views

How do various JavaScript mapping libraries compare?

I am working on a web-based mapping system and I'm trying to figure out the best/most appropriate library to use. There are a few of them about and they each have pros and cons. Even after trying a ...
18
votes
6answers
1k views

What embeddable web-based maps exist?

Some of the ones I'm familiar with (in no particular order): Google Maps (http://code.google.com/apis/maps/index.html) Bing Maps (http://www.microsoft.com/maps/developers/) Yahoo Maps ...
14
votes
8answers
10k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
13
votes
5answers
6k 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 ...
13
votes
5answers
3k views

Visualizing large datasets with Leaflet

When using Leaflet to visualize a large dataset (GeoJSON with 10,000 point features), not surprisingly the browser crashes or hangs. A sub-sample of 1000 features from the same dataset works ...
13
votes
4answers
3k views

Which framework is best to implement an application robustly, using ArcGIS Server JS API?

Over on the Esri forum, user Matt Moyles suggested that the approach used in the Esri JS samples isn't suitable for robust development of a web mapping application using HTML, JavaScript and CSS: ...
13
votes
1answer
412 views

Are there any Javascript map labeling engines available?

Does anyone know of a javascript library containing functions that would allow me to generate labels for points on the map so that the labels don't overlap one another, and have optional leader lines ...
12
votes
2answers
5k views

OpenLayers alternatives supporting more client-side features

I am considering different architectures for a system that will ideally use client-side rendering for point features and must be plugin-free. I have been using this application developed in response ...
12
votes
3answers
3k views

Open source alternatives to Google's StreetView engine?

I am looking to create an open source javascript app using either Leaflet or OpenLayers. Is there any way to implement panoramic views (similar to Google's StreetView) into either of these, or any ...
11
votes
3answers
2k views

Where can I find country borders data in human-readable format?

I'm trying to obtain some data representing the borders of all countries in the world. This data doesn't have to be very precise, it is to draw the countries on a computer screen. I did a bit of ...
11
votes
9answers
2k views

What is a good Javascript web API (preferably open) for building web maps that require little/no maintenance?

I have recently volunteered to make a web map for a local non-profit. The map will be pretty basic. It needs to display Lane county, Oregon split into multiple districts, with a "central office" ...
11
votes
4answers
1k views

Options for displaying PostGIS rasters in OpenLayers

This question is similar to an earlier question about displaying vector data in a web-map. I want to have a basic web interface which uses OpenLayers and can display raster data that is currently in ...
11
votes
2answers
2k views

OpenLayers 2.12 and http basic authentication woes

I am trying to use OpenLayers 2.12 to display WMS layers from a server which has HTTP Basic Authentication enabled. I have tried to handle the authentication by putting the username and password in ...
10
votes
3answers
326 views

What's a good library for displaying many small maps on a web page

I would like to create a visualization on the web similar to the following: http://namemapper.babynamewizard.com/namemapper/ Are there any good libraries for doing this? Is OpenLayers light-weight ...
10
votes
4answers
10k views

Overlaying lat/lon points on Google layer in OpenLayers

I'm stuck adding a vector point in lat/lon on top of a Google layer in OpenLayers. The point is moving when I pan the map. This doesn't happen if I replace the Google layer with a layer in WGS84. How ...
9
votes
2answers
1k views

Restrict pan and zoom in ArcGIS Javascript API?

I'm creating a web map of a university campus. I have the map functioning, but I don't want to be able to pan off of the basemap, into whitespace. Do you know of a function that will auto-pan the ...
9
votes
3answers
938 views

Best ways to embed dynamic maps into PDF files

Working in consulting, I found that sending clients PDF file with my embedded maps is one of the best ways to achieve a wow-effect from them. The latest pdf file formats all support the layers feature ...
9
votes
2answers
2k views

How to add a layer to SelectFeature without losing existing selections?

I'm using an OpenLayers.Control.SelectFeature for selections on multiple layers. However, when I add a layer using setLayer(), my selections on the other layers are lost. Anyone know how to work ...
9
votes
4answers
974 views

what is the right way to delete all features from featureLayer

I have a featureLayer and I don't want to kill it and create another one. I want to delete all features from the current featureLayer. I found that I can use applyEdits method but in order to use it I ...
9
votes
3answers
1k views

Chart inside pop up window in Javascript

How to show a chart inside pop up window? I'm using Leaflet JS, which has support for raphael plugin http://dynmeth.github.com/RaphaelLayer/. Is it possible to create a div inside popup window? I was ...
9
votes
2answers
277 views

Instructor led Web mapping development courses?

Hey guys I have been messing around with programing for a while now and have gotten proficient with Python and have some interest in HTML 5 and Javascript. I have recently received a request for an ...
9
votes
1answer
160 views

Mercator bias plot in Leaflet

I was inspired by this wikipedia image from the mercator projections page to hack around with leaflet. The idea was to interactively have your cursor move a continent and that it would be corrected ...
8
votes
5answers
10k views

OpenLayers - redrawing map after container resize

In my web application, I want to enable users to set the size of the map container. Everything worked fine when the container was expanded slightly (apparently this is because the tiles that were ...
8
votes
3answers
847 views

Map Application Requires Refresh to Initialize

I tried this question over on StackOverflow but didn't get any answers. Hoping you all might be able to help. Creating a web mapping application in Javascript/Dojo: When I load the app in a browser ...
8
votes
2answers
4k views

How to cluster Google Maps kml overlay

I have several thousand markers stored in a kmz file that I load into a Google Maps (v3 API). I've looked around to find a way to cluster the overlay data, but to no avail. MarkerClusterer looks ...
8
votes
3answers
2k views

Mobile offline mapping and editing of shapefiles

I've got a client that wants to create a mobile app that can view and edit shapefiles stored locally on the device to enable it to work offline. There is a possibility of converting the shapefiles to ...
7
votes
2answers
9k views

OpenLayers: Use scales instead of resolutions

Venturing around in the OpenLayers source code, it seems like everything related to zoom-levels is done using resolutions. Fair enough since this related directly to screen space. I would like ...
7
votes
1answer
1k views

Browser support for ESRI ArcGIS JavaScript API (v2.4)

Can anyone give me information or a good pointer on browser version support in the ESRI ArcGIS JavaScript API v2.4? I can't find much in their documentation beyond changes in support for specific ...
7
votes
2answers
1k views

How to resize a point on zoom out?

I've added a point on map like this but it is static in size. How to resize that point on zooming? Map on zoom out Any guidance and help is appreciated.
7
votes
3answers
8k views

Draw a point with ArcGIS Javascript API

I am currently trying to draw a point with the ArcGIS Javascript API. Pretty much like this example, http://help.arcgis.com/en/webapi/javascript/arcgis/demos/toolbar/toolbar_draw.html, except the ...
7
votes
1answer
5k views

How to Add/Remove Legend with Leaflet Layers Control?

I have two overlays http://02d0c8c.netsolhost.com/dev/lcb_census_layers3.html that can be turned on and off with a Layer Control. I’d like the legend for each layer to turn on/off along with the ...
7
votes
2answers
7k views

Adding/Removing Leaflet GeoJSON layers

I'm trying to show different GeoJSON layers at different zoom layers using the Leaflet API. I can load and display all three layers at once (though I don't actually want them all to show at once). I ...
7
votes
1answer
3k views

How to style features created by DrawFeature control?

I've been following this tutorial: http://workshop.pgrouting.org/chapters/geoext_client.html#select-the-start-and-final-destination It contains an Openlayers.Control.DrawFeatures control defined in ...
7
votes
1answer
1k views

How do we add a custom basemap in ArcGIS.Com that can be used in Javascript API?

It's possible to add a layer as a basemap in ArcGIS.com by checking the check box use as baselayer: But when I consume the map using: var mapDeferred = esri.arcgis.utils.createMap("<guid>", ...
7
votes
3answers
1k 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 ...
7
votes
1answer
2k views

Possible ways to display maps offline, inside mobile hybrid app

I want to develop a mobile hybrid application to run on both Android & iPhone devices in which i want to display my own map data. I have the SHP files with the data i need. I have Geoserver and ...
7
votes
1answer
1k views

How to configure custom scale in Leaflet?

I have a custom WMS tileset generated using ESRI ArcGIS Server. I have successfully configured an OpenLayers page to display this basemap. The code is as follows: var map = new ...
7
votes
1answer
981 views

Adding Panoramio Photos To An OpenLayers Map

I have a pretty well integrated OpenLayers map that I want to add photos from the Panoramio API to. Unfortunately, it seems both API's are under documented on this subject. I found one great tutorial ...
6
votes
3answers
1k views

tiny JS discretization library for choropleth representation

I would like to know if a tiny stat/discretization js library ready to use exists. I do know about the existence of jStat (which I may explore a little bit more thoroughly), and I know that mapfish ...
6
votes
3answers
3k views

Accessing GPS data with JavaScript in real time

Is it possible to access GPS data in real time on a smartphone with JavaScript (without an android or ios application I mean)? Thanks
6
votes
2answers
2k views

How can several vector layers have different controls, using Openlayers?

Using openlayers I have two vector layers. One layer is called lineLayer consisting of vector lines, and the other is called pointLayer consisting of points. When I hover on the lines I want to be ...
6
votes
3answers
8k views

Creating a Bing and Google Tile Layer for Leaflet

I want to use the Leaflet Javascript Library to display both a Google and Bing Tile Layer, though I'm unsure how to construct the url. The documentation shows an example using OSM: var cloudmadeUrl = ...
6
votes
4answers
4k views

How to get JSON from Geoserver using AJAX request

I am building a web mapping application using Leaflet and a sort of customized WFS-T API to place and retrieve features from PostGIS. I have the script for putting features in PostGIS tables down ...
6
votes
2answers
470 views

Progress bar for Leaflet map

Is there any way to show progress bar while waiting that all layers are rendered on Leaflet map? In this specific case, while geojson layers are rendered. Thanks.
6
votes
1answer
2k views

Is it possible to use esri.dijit.Popup for editing

In the new arcgis js api ESRI added new nice infowindow - esri.dijit.Popup. We can use it this way: //create a popup to replace the map's info window var popup = new ...
6
votes
2answers
242 views

Randomly Generate Streeview Point without GIS in country

I'm interested in pulling street view data at random within a country. I can only figure out how to generate a point within a bounding box. Often it pulls data from nearby nations. I'm using a GIS ...
6
votes
1answer
653 views

What does maps.nokia.com use?

The maps on maps.nokia.com are pretty amazing. I assume they're generating their own tiles but, does anyone know about the infrastructure behind site: the tile server used? and their JavaScript ...
6
votes
2answers
289 views

How can I zoomToExtent and then zoom out?

I use openlayers 2.12 I use HTML5's geolocation API to get the coords and then I insert them in a layer as feature (point). After that, I zoom in , since the layer has no other feature. ...
6
votes
1answer
1k views

Add a OpenStreetMaps road data layer on Google Maps API v3

I've successfully embedded a Google Maps API v3 map on my site, and added OpenStreetMaps (OSM) as the base layer. Is it possible to use Google's tiles as the base layer, and then overlay street data ...
6
votes
2answers
3k views

How to navigate the REST endpoints and retrieve Field information programatically

I'm adding a Dynamic Map Service to an ArcGIS Server JavaScript API map, and I need to get hold of each component layer and its fields, so I can run a query. See the sample ArcGIS Server services ...