A free and open source JavaScript library that is used by Web developers to navigate HTML documents, handle events, perform animations and add Ajax interactions to Web pages.

learn more… | top users | synonyms

13
votes
2answers
22k 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 ...
8
votes
2answers
6k views

Parsing a GeoJSON file with jQuery

I'm trying to iterate through a GeoJSON file (below) and eventually populate an array with a few attributes within "properties". I keep coming up short working through various examples I can find. Do ...
0
votes
1answer
160 views

CartoDB layer not showing up on over mapbox layer but legend is

Currently, the legend is only displaying but not the layer. NOTE: I am trying to run the web map on a bootstrap modal, hence you will see: $('#webmap-modal').on('shown.bs.modal', function() in the ...
7
votes
4answers
10k 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 ...
2
votes
1answer
416 views

Can individual feature properties be retrieved from the CartoDB.js API?

I'm building an application that uses CartoDB to show users how a proposed redistricting plan would affect them. The user enters an address and that fires a ST_Intersects query to CartoDB, the result ...
2
votes
1answer
23k 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 ...
4
votes
2answers
881 views

Is there an existing way to do linear referencing in ArcGIS JavaScript API 2.1?

First of all, let me specify that this is for the JavaScript API 2.1 or later only, not ADF/Google/Virtual Earth/Silverlight/Flex or any of the other extensions. We've been creating geometry from a ...
2
votes
1answer
1k views

Hide/Show route layer in Leaflet when click on button (Easy Button plugin)

I have a Leaflet map with button (Easy Button plugin https://github.com/CliffCloud/Leaflet.EasyButton). When click on button on map added route layer (plugin ...
0
votes
0answers
180 views

Leaflet / JQuery -cannot add or remove class to divIcon marker

(this is related to a previous question of mine) I am adding a divIcon (an svg) as the icon for features in a geoJSON, using Leaflet. I can add a class to the html property of the icon, but I cannot ...
0
votes
2answers
2k views

How can I add attributes contained in JSON data to an OpenLayers popup?

I am working on a website using jQuery, Javascript, and OpenLayers. I am adding markers to an OpenLayers Vector layer using the following code: var pointLayer = new OpenLayers.Layer.Vector("POI ...