Questions tagged [jquery]

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.

Filter by
Sorted by
Tagged with
30
votes
3answers
40k 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
4answers
17k 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 ...
9
votes
2answers
12k 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 ...
4
votes
1answer
13k views

How to set an ol.style.text using a source in OpenLayers?

I have the following code: var cbcWFS = new ol.source.GeoJSON({ projection: 'EPSG:3857', url: 'http://localhost:7070/geoserver/CuerpoBomberosCurico/ows?service=WFS&version=1.0.0&...
4
votes
1answer
34k 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 initialize(){...
2
votes
1answer
537 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
3k views

Reading through GeoJSON using Turf.js?

I have a simple app that takes a coordinate and determines what GeoJSON polygons it falls inside, then I take the polygon data and put it into a table. I have working code that uses turfjs and ...
1
vote
1answer
2k views

Dynamically create leaflet popup via JavaScript Object

I want to dynamically populate a marker popup via a JavaScript object. I have a JavaScript object like so: {address: "92101 S Martin Ave.", address2: "", agent_name: "mr smith", animal: "sheep", ...
0
votes
2answers
5k views

Leaflet : How to update polyline ? Live Tracking

var ColorVar = '#bd0026'; var firstpolyline = new L.Polyline(polyList, { color:ColorVar, weight: 8, opacity:0.8, smoothFactor: 1 } ); ...
5
votes
2answers
1k 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
4k 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 https://github.com/perliedman/leaflet-...
2
votes
2answers
126 views

Looping through an array to show multiple points on the map [closed]

I am trying to add multiple points on the map. Data comes from the server as a multi array. JSFiddle. Notice that all points share the same name (when clicking on the point) This is the response ...
2
votes
2answers
458 views

Joining CSV to KML/GeoJSON in Leaflet webmap and showing joined data in popups?

I'm trying to create a Leaflet/Mapbox webmap with line layer (GeoJSON or KML) with some IDs and data coming from the .csv (after joining through this ID) file located on the same path as the index....
2
votes
1answer
635 views

Adding feature property values to filter drop down option in Leaflet, instead of keys?

How would I convert this function to store and utilize (feature.property.id) json values instead of keys in the dropdown menu within a leaflet map? <html> <head> <meta ...
1
vote
2answers
3k views

Adding attributes contained in JSON data to 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
4k views

Export PDF from OpenLayers map with jsPDF

I try to use javascript library JSPDF for export my OpenLayers map but it doesn't work. I create my HTML : <head> <script type="text/javascript" src="script/ol_3.7.0/build/ol.js">&...
0
votes
1answer
513 views

turf.js point never found inside or within GeoJSON features loop

I have a GeoJSON http://radikal.com.mx/distrito.json and all I am trying to do is find if a turf point that has a longitude and latitude is inside or within that GeoJSON. No matter what point I use I ...
0
votes
1answer
2k views

leaflet / omnivore - create function to display omnivore CSV markers by property value

there seem to be a number of questions out there but none have quite answered this for me. How would one go about taking a custom set of values from a property like latitude, and then assign them to ...
-1
votes
1answer
560 views

Drag issue on an OpenLayers map inside a jquery ui draggable div

I'm trying to put an OpenLayers map inside a draggable(); div. The issue is that when I try to drag the map, all the containers drag too. Any ideas? Example: http://jsfiddle.net/0njnady6/