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

7
votes
2answers
8k 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
748 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 ...
6
votes
1answer
5k views

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

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
6
votes
4answers
5k 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 ...
5
votes
4answers
10k views

Convert latitude and longitude into northings and eastings

Hi 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 Eastings, Northings for the postcode is:- 389490 283880 ...
5
votes
2answers
2k 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 ...
4
votes
1answer
621 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
2k 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
2answers
601 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
330 views

How to highlight feature clicked as row in table using OpenLayers+jquery?

I am a Masters student from Sweden. I am doing my Masters thesis on Internet mapping. In my project I am trying to display research data from my department on Google maps. I am using OpenLayers java ...
3
votes
1answer
134 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
1answer
2k 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 ...
3
votes
1answer
778 views

OpenLayers jQueryUI Draggable

I am using open layers 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
1answer
423 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
2answers
280 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 ...
3
votes
1answer
2k 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 ...
2
votes
1answer
293 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 ...
2
votes
1answer
697 views

How to make OpenLayers.Popup draggable?

I've used jquery-ui draggable option as following but the moving popup can not be ended once dragging has started. Is there any another method to make OpenLayers.Popup draggable? popup = new ...
2
votes
1answer
497 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 ...
2
votes
1answer
1k 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, ...
2
votes
1answer
429 views

call child div function from parent (not using window.opener)

This is a a Javascript/JQuery question that is directly related to the ArcGIS Javascript API... I have a map div created using a 'data' tag in HTML, which becomes visible on a button click. (I'll ...
2
votes
1answer
2k 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 ...
2
votes
0answers
26 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 ...
2
votes
0answers
111 views

Leaflet Drag and drop to change existing markers

I'm working on a project where the user should be able to drag an image to a pre-existing marker and have the marker update color if the value of the marker (a value w/in the geojson) and image (a ...
2
votes
0answers
159 views

Show geoJSON properties in jQuery Mobile Panel

First off I'm a novice at JS so please bear with me if this is a simple task to complete. I'm currently using the stock LeafletJS popup bubble to display the properties from my geoJSON. However, I ...
2
votes
0answers
65 views

Features disapearing

When I add a polygon feature it shows on the map. When I add another one the first one disappears. The code for adding is below: $.postJSON('@Url.Action("GetLayers")', { "planId": planId }, ...
1
vote
2answers
4k views

SelectFeature not working in OpenLayers

I'm still sort of new to openlayers, but I've been able to set up a map which reads in a KML, loops through the different regions contained therein, and draws those polygons on a vector layer overtop ...
1
vote
2answers
175 views

Esri GIS Bookmark but with out a dijit

I need to create a "Bookmark" like drop down on my site. Inspiration comes from samples:1) http://developers.arcgis.com/javascript/samples/widget_bookmarks_dropdownbutton/ and 2) ...
1
vote
1answer
314 views

OpenLayers + GeoServer's WMS — Passing Feature ID into a Variable

I have a WMS PostGIS-based polygon layer served by GeoServer, and whenever I click on any feature I want to get its gid value, so I can pass this value to the DOM. Unfortunately, I could not find a ...
1
vote
2answers
130 views

jQuery element value to js object ID

I am trying to set the visibility of a layer in Openlayers map according to a checkbox status with a class ".layercheck" and value is the name of the Openlayers layer. So here is my HTML: <input ...
1
vote
1answer
27 views

Determine size of screen/map to limit number of markers displayed

I am writing a JQuery Openlayers javascript web application that connects to a API, which exposes a million geo located points plus metrics and information about the points. One metric is a points ...
1
vote
1answer
42 views

Can 3rd party javascript libraries be used with CartoDB?

I'd like to build some functionality (search, sliders, etc.) in a 3rd party javascript library (jquery mobile), and integrate it with CartoDB. Can this be done? Are there any examples available or ...
1
vote
1answer
30 views

How do I cycle through the available Overlays and Base Layers using OpenLayers

I would like to have my map cycle through the display of loaded overlays and base layers using Javascript or jQuery. I would like to do this with a delay of 5 seconds between cycling. Does anyone ...
1
vote
1answer
155 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 ...
1
vote
1answer
100 views

jquery communication with arcgis services

I am working with the ArcGIS JavaScript API for my application. My app users are stored in a table published in a map service. Whenever a user wants to connect to the app, he needs to provide a ...
1
vote
1answer
391 views

load map parameters after opening new window

I am trying to open a new window from an existing window, which will contain a map with an extent derived from the original window. In other words, the user will zoom to an area in the original ...
1
vote
0answers
21 views

How to change dialog box with jQuery Mobile on OpenLayers

I have a problem with dialog box made with jQuery Mobile on OpenLayers. I want to make a popup box instead of a dialog box, but when i click the point the info for the point appears at different ...
1
vote
1answer
3k 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 ...
1
vote
1answer
250 views

OpenLayers Vector polygon and Jquery Droppable

How can I use Jquery Droppable to drag and drop an Icon over an openlayers polygon vector and select the polygon while over on hover? I have managed create a create a popup when over a div element, ...
1
vote
1answer
612 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 ...
1
vote
1answer
169 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
1
vote
0answers
275 views

What are some really cool web/mobile GIS UI examples? [closed]

I need some ideas on eye candy for our product. We have to display maps with lots of data on accessible through the web. Most sites I have seen have a Google, or OSM map with markers and layers ...
0
votes
1answer
226 views

OpenLayers: How to add permalink long/lat anchor to links outside of map on page

I would like to extend the funtionality of OpenLayers that appends, on-the-fly as the user zooms and pans the map, the longitude/latitude parameters as a anchor to the URL in the browser's address ...
0
votes
2answers
400 views

Using jquery to reset layer in OpenLayers

I've used a combination html, jquery and cql to redraw layers in Openlayers using specified parameters. This worked fine as seen here: http://www.dartmoor-npa.gov.uk/index/test-map3 I also want to ...
0
votes
2answers
250 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 ...
0
votes
1answer
313 views

Openlayer map add combo in panel

I just want to add combo box on openlayer map panal. I dont know how to add combo to openlayer panel so currenly i have set absolute location to combobox , like this http://jsfiddle.net/4zNH6/ ...
0
votes
1answer
111 views

jQuery tabs into OpenLayers switcher layers [closed]

How can I put jQuery UI tabs in openlayers layerswitcher? I can not imagine how this can be done ...
0
votes
1answer
602 views

Use new OpenLayers.Filter.Logical from OpenLayers into jQuery

I've a small GIS app, displaying stations on a map. Very simple. At start, none of the stations are displayed, even if its layer is enabled. What I want, when I click on a div, is to display one the ...
0
votes
1answer
2k views

leaflet fitBounds with multiple marker

I have created two checkboxes. If I check one it will zoom to a point with marker. If I uncheck the checkbox the marker removed. Similarly second one is working. But I want to do if the two checkboxes ...
0
votes
1answer
760 views

Heatmap.js is not displaying on OpenLayers

I tried to follow the example on the heatmap.js but for some reason it is not displaying the heat map layer, and the layer control is not working. Maybe I am missing something stupid. Can someone ...