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

1
vote
1answer
29 views

Leaflet display only clicked element of a loaded map layer (polyline)

I am creating a web mapping application that will return appropriate routes based upon ST_length query on a cartoDB dataset. So far, the code below successfully maps those routes with individual ...
0
votes
0answers
12 views

Getting PNG map from PostGIS to Node and then jquery

Using Jquery, I am aiming to get png map from postGIS which has been created dynamically from node server in different port. I used jsonp to overcome cross domain issue in jquery. $.ajax( ...
4
votes
1answer
2k 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 ...
3
votes
2answers
4k 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 ...
3
votes
2answers
3k 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 & ...
0
votes
0answers
9 views

Want map layer colors to change with button clicks… One of them isn't working correctly!

I have three buttons that show different queries on a data set. I want them each to also display in a different color. When the map loads, I have the default layer in blue. However, After clicking the ...
0
votes
1answer
26 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
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 ...
1
vote
1answer
448 views

Why do I have to reload the page, to show the Map correctly?

I added a map, in the way I'm supposed to, but why do I have to reload/refresh the page, to get the map (almost) as I want to? This is, what I mean: Map before reloading the page: Map after ...
1
vote
2answers
1k views

Using OpenLayers 3 spyglass?

I would like to use OpenLayers 3 spyglass example inside my project. The problem is when I want to use selection for layer, which will be inside spyglass circle. I can't get it working, I don't know ...
2
votes
1answer
441 views

How to append result to Geocoder text box using ArcGIS JavaScript API?

I want to append result of a custom search in a Geocoder text box in ArcGIS JavaScript API by overriding the default result. I have written the below code for this, but I am not getting a ...
1
vote
1answer
719 views

Google Hybrid Map tiles won't load in OpenLayers when centered on certain position

Since the Google Maps API update to V3.2 (17 Feb 2015) our maps have not been loading to their initial state, centered over the Gulf of Mexico. When the center location is: center: new ...
0
votes
0answers
31 views

Is it possible to select and highlight a polygon that contains points in one cluster in openlayers 3

my question is I need to select one cluster for that cluster there will some points. Right now I am able to select points in one cluster selected from the drop down. i have added markers to it. now ...
0
votes
1answer
1k views

How to use OpenLayers 3 with a WMS supplied by MapServer?

I'm not able to centralize my map in OpenLayers / MapServer , it appears at the top . The " center " do not work . Below my code to better analyze . I did not post the mapfile why I did an experiment ...
1
vote
1answer
41 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 ...
0
votes
1answer
2k 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
46 views

How to store a vector layer as a geojson file in openlayers 3?

So I have some vector layers that I import from geojson files and run some search on them, I want to display only the results of the search as a vector layer. I am using a jquery form to search, and ...
1
vote
0answers
39 views

How to load JQueryUI into Web AppBuilder?

There is an example widget using JQuery in {WAB root}/client/stemapp/widgets/samplewidgets/UseJQuery and the code can be easily adapted for other versions of JQuery. However, I want to use JQueryUI as ...
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 ...
1
vote
1answer
41 views

Leaflet : load & remove layer at specified interval time

I want to load and remove a layer in a specified interval of time. I make it blink with a random color function associate to my layer style. I can load this layer multiple times, unload it in a ...
-1
votes
1answer
26 views

Set Visibility Openlayers

If the name of my layer in openlayers is "olayer". And if i want to set its visibility to true. Then the simple code is olayer.setVisibility(true); But if i want to set the visibility by ...
0
votes
0answers
46 views

Moving to CartoDB from Fusion Tables - User interaction with Map and Table data

I currently use fusion tables with great results. I am now looking for advice as I am contemplating moving to CartoDB. I have a need for users to be able to interact with mapped data in a spatial ...
2
votes
1answer
40 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" ...
2
votes
0answers
101 views

Populate list from arcgis server service in JQUERY javascript aplication instead of DOJO?

I would like to populate a list on a select combobox using jquery 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 esri ...
0
votes
0answers
20 views

Adding additional markup to leaflet marker_

I'm trying to customize the html output for my leaflet markers. Specifically, I'm trying to assign them additional data attributes to trigger bootstrap modals based on an ID pulled from the database ...
1
vote
1answer
300 views

Leaflet: how can I update content of popup by jQuery

in my popup is a spinner with class=spinner and an empty container for addon informations. I want to hide after successful ajax. I want to add some html in a container. I tried this: ~~~ ...
-1
votes
1answer
120 views

How to plot latitude and longitude stored in database on ArcGIS map

I am new to ArcGIS and I have tried basic things like I created a csv file with latitude,longitude and place as data in it. I imported that file as a layer when I created a web map in ArcGIS. This ...
1
vote
1answer
340 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" ...
3
votes
0answers
186 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 ...
0
votes
0answers
145 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
1answer
139 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 ...
6
votes
4answers
18k 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 ...
1
vote
1answer
585 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 ...
0
votes
1answer
62 views

How to get attribute of the leaflet marker?

is there a way to get and hold the option attribute of the leaflet marker? marker = L.marker([lat,lng], {draggable:true,icon: L.AwesomeMarkers.icon({icon: '', prefix: 'fa', markerColor: ...
0
votes
1answer
1k views

how to display the coordinates of a openlayers map with a jquery in my asp.net textbox?

this is my initmap.js OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { defaultHandlerOptions: { }, initialize: function (options) { this.handlerOptions = ...
0
votes
1answer
457 views

CartoDB json to HTML Table using Javascript or Jquery

I am trying to display the dataset inside the cartoDB as HTML table. When i give request to the postgre database by SQL API, it is returning as the format (json) below in the snapshot. I want the ...
2
votes
1answer
187 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 ...
8
votes
1answer
7k 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 ...
0
votes
0answers
57 views

Activate click events on graphics outside of map

Using a JSON feed, I have plotted map points onto a basic map. I've set them up to center and display a popup when clicked. I would also like to activate the centering and popup by clicking on an ...
0
votes
2answers
36 views

tag based filter in OpenLayers

I want to filter an OpenLayers(2) vector layer based on tags. Therefore, the vector layer has a property column which can be filled by comma-seperated tags like e.g. "culture,food,park", but also only ...
0
votes
0answers
42 views

How to get the directions of the co-ordinates in leaflet?

Now i'm working on the live tracking to track my vehicle.I want to get the directions to change the marker position based on the co-ordinates. I have using arrow icon for marker icon. I need to ...
0
votes
1answer
188 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 } ); ...
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 ...
1
vote
0answers
24 views

Ajax parameters to arcGIS's find Address

I write a ajax to consume the arcGIS services to return json results, I have tried so many way for the findAddress function parameter, non seems work, plese help. Below is my code: function ...
1
vote
1answer
41 views

Openlayers 2 Cluster map Convert from WMS to OSM

I have implented a simple open layers map to plot stores on the map ive done this using wms fiddle https://jsfiddle.net/7n42uaux/3/ now i want to use osm maps new OpenLayers.Layer.OSM(); when i ...
1
vote
1answer
572 views

cartodb Feature Click with two overlapping layers

We are using Google MAP API V3 and CartoDB. I am trying to create the custom info box window as user clicked on CartoDB points marker. We have two layers on Google map first one for UK wide ward area ...
1
vote
1answer
87 views

Invalid value for <image> attribute x=“NaN”

I'm working a jQuery Mobile page with an ESRI jsapi map and a dialog which calls on a geocoding service to return an x/y which I plunk a graphic on the map and then center up on. This site runs very ...
0
votes
1answer
192 views

Get GeoJson feature by ID and zoom on entity

I have got a leaflet map with Geojson layers : I use jquery Autocomplete to search an entity by name or id, I have no problem with that. I need your help because I'm not able to refer to a specific ...
0
votes
0answers
24 views

ESRI story map and Jquery-ui dialog function not collaborating

I am trying to edit an ESRI story map (just the html) so that I can integrate a jquery-ui dialog box in the webmap. I have the correct links in the head, and the correct javascript piece, but for some ...