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 ...
9
votes
4answers
27k views

Converting latitude and longitude into northing and easting?

I have the following UK postcode dy8 3xt and know that the latitude and longitude is:- 54.452772 -2.156082 I also know that the Easting, Northing for the postcode is:- 389490 283880 However I ...
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 ...
8
votes
1answer
8k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 2125245.48389919,512193.976625564 ...
8
votes
1answer
3k views

Geoserver GET request to the REST API without authentication

I am using Geoserver to serve a number of WMS layers. I am using jQuery's $.getJson('/geoserver/rest//featuretype.json') to programmatically populate a table with the available layers and their ...
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 ...
6
votes
2answers
4k views

Using the jQuery UI Slider to control layer opacity in OpenLayers

Added some bounty so more people take a look at my question. Thank you. I have been trying to utilize the jQuery UI Slider to control layer opacity in OpenLayers but I have an issue when trying to ...
6
votes
2answers
12k views

Make sidebar div active on Marker click (and vice versa)?

What's the best way to change an element to active when you click on a marker. For example, when you click on a marker on a Leaflet map, how to make it so the sidebar element that's related to it ...
6
votes
1answer
3k views

Using JQueryUI Slider to change Layer Display (Leaflet)?

Can't seem to figure out how to use JQueryUI Slider to change the layer display on my leaflet map. Scenario is basically, When user slides bar across a dfferent layer shows up on the map (in years) ...
5
votes
2answers
1k views

ArcGIS Javascript API on Wordpress 4.1

SOLUTION: For everyone interested: turned out the solution was moving all files that use DoJo beneath the jQuery UI files, so that jQuery UI is fully loaded before any DoJo stuff loads. Moved them all ...
5
votes
1answer
3k views

Texture overlay in d3 map

D3 map can be drawn and colored as shown in this example : http://techslides.com/demos/d3/d3-world-map-zoom-points.html. I need to overlay a texture or image within the boundary of a given country. Is ...
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 ...
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
3answers
1k views

Make InfoTemplate moveable but still highlight attributes

I’m using the esri/InfoTemplate in the Javascript API to identify features. However, it gets anchored to the mouse click and cannot be moved around. Based on this answer I used dojo/dnd/Moveable to ...
4
votes
2answers
7k views

Click link inside Leaflet Popup and do javascript

I have a leaflet map up and running. It overlays a series of polygons (via GeoJSON) on the map and attaches popups to each polygon. Each of the popups display information about that polygon. I'd ...
4
votes
1answer
710 views

Can JQuery Mobile UI provide a user-created attribute table for a user-created point feature?

I'm looking into using the JQuery Mobile UI, and I would like the user of the app to be able to create their own point on the map and add a few short attributes. Any idea if this is possible? Thanks ...
4
votes
2answers
12k views

Google Maps need to click twice to get marker click event to trigger

I have a google map that I am populating with real estate listings from a database. I have set it up to refresh the listings when the map is panned or zoomed. I am using the dragend & ...
4
votes
1answer
2k 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 ...
4
votes
2answers
1k views

Populating D3 Graph with Cartodb

I have been looking at D3 and following along with their basic tutorials. In the documentation you can use json files to create graphs, however I am confused on how to make the connection from my ...
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(){...
4
votes
1answer
1k views

Highlighting feature clicked as row in table using OpenLayers 2 + jQuery?

In my project I am trying to display research data on Google Maps. I am using OpenLayers java library in my project. I would like to connect a table to the map in a way that the user can click on ...
3
votes
1answer
680 views

Can't get simple map to show up on my test site using CartoDB

So I'm trying to get a simple test-site setup but it's not working. Whenever I load the site I can very quickly see the controls flash on the screen then go away. The when not doing local testing, ...
3
votes
2answers
2k views

Having trouble with the getFeaturesAtCoordinat() method in OpenLayers

Why reason when I do click in a polygon, it works and not in a point? I have the following jQuery Code: var despachosFeatures = despachosWFS.getFeaturesAtCoordinate(evt.coordinate); var ...
3
votes
1answer
671 views

Can arcserver be used to populate jquery autocomplete?

I would like to set up autocomplete on a text box using jquery autocomplete with data from an arcserver service. I'm wondering if this is possible and if so how i would implement it. I'm using the ...
3
votes
2answers
172 views

Make Leaflet polyline bold by hover?

I have a Leaflet map that I show streets and also there is an unordered list of street names in the same page with map. What I want to do is when mouse cursor hovers on a street name in the list, the ...
3
votes
2answers
762 views

How to extract GeoJSON vector layer coordinates from DOM, Openlayers 3

I created a GeoJSON vector layer using OpenLayers 3 API, the vector layer is a county map. My goal is by clicking, I will be able to select the county and extract the coordinates. (like shown below) ...
3
votes
1answer
1k views

How to pass GeoJSON array to datatable dynamically using Javascript

I want to pass one GeoJSON file to a dynamically created datatable using Javascript, I am unable to identify the column names in the file. I have tried this: <body> <table id="example" ...
3
votes
1answer
918 views

How can I load GeoJSON from URL to leaflet? [closed]

I want to use leaflet's L.GeoJSON to load the GeoJSON from my URL. I have tested to use leaflet-ajax plugin and it worked. The codes as follow: <link rel="stylesheet" href="http://cdn.leafletjs....
3
votes
1answer
6k 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'...
3
votes
1answer
1k views

OpenLayers jQueryUI Draggable

I am using OpenLayers to render a WMS inside of a div tag. This is right out of the OpenLayers documentation. My WMS layer is rendering well. <div id="map"></div> Using the jQuery UI ...
3
votes
2answers
751 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": [ ...
3
votes
1answer
6k views

dynamic content in leaflet popup window

I can add static html code to a Leaflet popup window but can not load a Dygraph chart into a popup window. How does one load dynamic content into a Leaflet popup window? Here is a simple jsfiddle with ...
3
votes
1answer
1k views

ArcGIS JS API: Zooming with mouse wheel/double-click forces pan

I have a map that I'm initializing off-screen and sliding in using jQuery. For some reason zooming in with the scroll wheel or by double-clicking causes the map to simultaneously pan down (or pan up ...
3
votes
1answer
946 views

How to add/remove layer based on Dropdown Selection in openlayers3?

I am using Openlayers 3 to add list of layers. I want to display only one layer based which is selected in dropdown. I am defining layers are: var layers1 = new ol.layer.Group({ layers: [ ...
3
votes
1answer
4k views

How to animate Markercluster Icons

I am using Jquery Google Map V3 with markerclusterplus. I want to animate a cluster icon when hover the icon. My Clusterhover event code is, var mc = new MarkerClusterer(map, markersarray,mcOptions); ...
3
votes
1answer
7k views

How to find direction points using Google Maps API 3?

I am drawing a route in Google Maps. I have passed the start point, way points and end points. My route is drawing correctly. I am using Google Maps API 3. request = { origin: originAddress, ...
3
votes
1answer
3k views

OpenLayers + GEOExt + extjs. VS OpenLayers+jquery

Could some one maybe tell me if there are any real benefits of using OpenLayers + GEOExt + extjs. as oppose to using only OpenLayers and maybe jquery for client side webgis apps? Edit: thanks for ...
3
votes
1answer
4k views

How to curve lines between points on a map?

I'm trying to curve the lines between points on a RaphaelJS map like Tata Communications - but how did they do it? What sort of mathematics lie behind these curves - unless ofcourse they're all ...
3
votes
0answers
84 views

Displaying QGIS's “Map Tips” in OpenLayers?

Still a little new to QGIS and Openlayers. How would you display QGIS's "Map Tips" into OpenLayers? I am currently using QGIS 2.18 and have the latest update in Openlayers. In QGIS, I have created a ...
2
votes
2answers
7k views

Filter GeoJSON by attribute in Leaflet using a button

I have a GeoJSON point layer group styled as a circle marker; it has a color attribute which can be one of many values: white, black, blue, red etc. I want to create a filter based on that attribute, ...
2
votes
2answers
8k views

OpenLayers 3 toggle feature visibility

This seemed simple on the face of it, but I am unable to figure out how to toggle the visibility of a marker feature using the Version 3 API of OpenLayers. In my situation, I am adding features to a ...
2
votes
1answer
4k views

Adding multiple OpenLayers Vector Layer markers to map using AJAX, JSON, and jQuery?

I am attempting to parse a JSON file and place markers on an OpenLayers based map application. I am using jQuery to perform the AJAX and iteration on the JSON file. I am having a problem with the ...
2
votes
1answer
41k views

Google Map - display specific markers popup using a list of markers

I have the following code: <script type="text/javascript"> window.onload = function() { // Creating a new map var map = new google.maps.Map(document.getElementById("map"), { ...
2
votes
2answers
128 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
1answer
113 views

where i can add style in this code leaflet

var urlborne = 'http://localhost:8080/geoserver/Gestion-proprete/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Gestion-proprete:borne&maxFeatures=2000&outputFormat=text/...
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 ...
2
votes
1answer
1k views

Accessing HTML using jQuery within LeafletJS popup.

So I want to add some HTML code to a Leaflet popup, but I also want to be able to to perform some jQuery functions when this HTML is clicked, like so: .bindPopup( "<button id='clickHere'> <...
2
votes
1answer
357 views

Sortable list of layers

I want to create a sortable lists of layers using jquery ui. I'm trying to use .setZindex() and .index() method. I think that index of <li> does not refresh after order changing. I'm not ...
2
votes
1answer
1k views

Detecting onClick event for clicking Printout button of ArcGIS API for JavaScript?

I am wondering if there is a way to detect when a user clicks the "Printout" link after using the print task in ArcGIS Javascript 3.14. I have set up many custom options in my mapping application ...
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-...

1 2 3 4 5