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
33 votes
3 answers
51k views

Adding/Removing GeoJSON layers using Leaflet

I am 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 do not actually want them all to show at once). ...
Josh's user avatar
  • 1,162
7 votes
4 answers
19k 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 ...
northlandiguana's user avatar
10 votes
2 answers
15k 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 ...
geomajor56's user avatar
  • 2,102
6 votes
1 answer
21k 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&...
Javier Muñoz's user avatar
5 votes
1 answer
3k views

GeoJSON not showing in leaflet map?

I'm trying to load a GeoJSON file in to my Leaflet map and can't see what's going wrong. From looking at other questions I've used jQuery Ajax to call the geojson. The GeoJSON is in the same directory ...
Jamie's user avatar
  • 372
5 votes
2 answers
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 ...
Tim Rourke's user avatar
4 votes
3 answers
2k views

Zoom on Linestring object in Leaflet

I'm using Leaflet and trying zooming on a LineString object from a geojson file. Here is an extract of my file (with a lot of LineString objects): { "type": "FeatureCollection", "features": [ ...
Michela Zanni's user avatar
4 votes
2 answers
8k 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 can'...
yesman's user avatar
  • 478
4 votes
1 answer
35k 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(){...
Dea Venditama's user avatar
2 votes
1 answer
2k 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 ...
bikingman's user avatar
  • 307
2 votes
2 answers
2k 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 ...
Andd's user avatar
  • 267
2 votes
2 answers
1k 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....
Jakub O's user avatar
  • 83
2 votes
1 answer
5k 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">&...
Geo-x's user avatar
  • 357
2 votes
2 answers
11k 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 } ); ...
Karthikeyan's user avatar
2 votes
1 answer
546 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 ...
Bill Morris's user avatar
2 votes
1 answer
6k 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-...
spatialhast's user avatar
  • 3,621
2 votes
2 answers
4k 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 ...
GIS Student's user avatar
2 votes
1 answer
6k 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 ...
Bill Chappell's user avatar
1 vote
1 answer
1k views

Uncaught Error: Unsupported GeoJSON type: undefined - Openlayers

I get a valid geojson from the database using a query. Below one is the php script used to read the data. <?php include "../includes/init.php"; // including data base connection $sql = &...
Hashan hemachandra's user avatar
1 vote
1 answer
3k 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", ...
mkeller's user avatar
  • 179
1 vote
1 answer
2k 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 ...
JasonBK's user avatar
  • 610
0 votes
1 answer
2k 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 ...
Francisco Astorga's user avatar
0 votes
1 answer
3k 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 ...
M00shiM00sh's user avatar
-1 votes
1 answer
647 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/
jonyjm's user avatar
  • 119