An application programming interface specific to Leaflet.

learn more… | top users | synonyms

0
votes
2answers
13 views

How to change Leaflet marker color on mouseover?

I'm having a hard time figuring out why the Leaflet method setstyle will change the color of a polygon but not the color of my markers. Polygon works fine: But the markers won't change colors: ...
1
vote
2answers
60 views

Leaflet highlight feature by ID

I have a map application where: I load polygons as GeoJSON objects I draw all polygons in a single layer I highlight a polygon on mouse hover What I need to do is the following: on mouse hover, I ...
3
votes
1answer
175 views

Leaflet add and remove legends with layer selection

I'm new to Leaflet/Javascript and have been struggling to get legends a map to show only when a specific layer is selected from the layer control. I have three layers, one of which I would like to ...
0
votes
1answer
289 views

How to add event listener to many markers on the map?

How can I add an event listener to many markers on the map? I know how to add an event listener to a single marker say: var marker = L.marker(...); marker.on('dragend',function(){...}); So, how can ...
3
votes
1answer
649 views

Change default leaflet marker color

I'm using esri-leaflet, and leaflet inherently to add a point feature class (geojson) to a map. What is the best way to add and style the layer? I've see pointToLayer on the leafletjs.com, but don't ...
1
vote
1answer
402 views

Unable to get Mapbox leaflet-omnivore to load markers from .csv

I'm using the Mapbox.js API to build a really simple web map using a .csv file to place markers with tooltips. I'm trying to use the suggested leaflet-omnivore library to easily parse the csv and ...
1
vote
1answer
256 views

Leaflet JS calling animatedMarker.stop() from event listener

I'm using the animated marker plug-in for Leaflet JS and would like to stop the marker from animating when it reaches a certain lat lon position. Currently I'm using Leaflet's 'move' event listener ...
2
votes
1answer
146 views

Display a control (zoom bar) outside map container in Leaflet?

I need to extend a zoom control so that it is functional outside of the leaflet map container. Can this be done? Essentially,the same idea as what is accomplished with this item here but under the ...
2
votes
1answer
112 views

Leaflet.js and CartoDB.js event conflict

Little problem here. I’ve got a layer from a CartoDB viz that I’m listening to the featureclick event. When a feature is clicked I highlight it by applying cartoCss. However, I want to unhighlight it ...
3
votes
1answer
337 views

Zoom further in with leaflet javascirpt API

We're using the leaflet JavaScript API with a tile layer which supports zoom level up to 19. I'd like users to be able to zoom further even if the tiles blur as they have to place markers to a high ...
1
vote
0answers
250 views

Leaflet Event Craziness: jQuery click events don't propagate to L.DomEvents

I noticed that calling .click() on jQuery selected DOM elements in Leaflet ( such as anchor icons ) will not do anything -- the click event isn't propagated to the events created with L.DomEvents. For ...
1
vote
1answer
71 views

How can I make sure that tiles display properly when you first go to the page?

This page is not showing my map tiles properly when you first go to the page. http://bear.hol.low.li/Pocket_Docent/map.htm If I resize the window it centers and distributes the tiles properly. How ...
4
votes
1answer
2k views

problem adding pop-up to GeoJSON layer in Leaflet

I'm new to working with the Leaflet API and am running into trouble with creating popups for a GeoJSON layer. I've looked at the following post as a reference and am still having difficulty: binding ...
2
votes
1answer
2k views

Combine Leaflet with Geoserver WMS map

I'm not very skilled within the GIS world, however, I would like to know if it's possible to use this map: ...
4
votes
1answer
81 views

How can I create drawFeature control in leaflet?

I want to call a callback on leaflet after drawing a feature. In openlayers I do it like this : customControl= new OpenLayers.Control.DrawFeature( tempLayer, ...
1
vote
1answer
364 views

Leaflet Custom menu links

I have an issue where leaflet when embedded in Drupal will not allow the user to click on the map as the Y coordinates have a decimal on for some reason. As a quick fix, I am thinking to put the map ...
1
vote
1answer
284 views

Leaflet Legend fixed image? not SLD?

I have a style pulled from my GeoServer and have created a basic legend, with a fixed PNG. However I was wondering if it is possible to have this legend be pulled from the layers SLD? so that if the ...
1
vote
0answers
51 views

How to draw ploygon in leaflet that use event?

Is it one way to draw ploygon by https://github.com/Leaflet/Leaflet.draw plugin ? you want draw anything that you must add control(“map.addControl(drawControl);“). I want to draw ploygon on leaflet ...
1
vote
1answer
95 views

Removing Places from OSM

Doe is exists a way to remove all the places from the OSM map? Also like shops, bars, restorations, hotels etc. I wish to use a maps with a less info. Is it possible to do this from the original OSM ...
0
votes
1answer
259 views

CartoDB Convert from the_geom to google's lat long

I have a CartoDB table that when I query it via the rest api I get something like this: { "name": "sas", "street": "la plata 2390", "cartodb_id": 1, "created_at": "2013-06-26T00:46:21.412Z", ...
0
votes
2answers
396 views

Leaflet WMS layer not working until zoomed

I created a toggle button to add and remove wms layer from the map. In the default zoom level, it is working fine. But when I remove layer and zoom in or out, then do "Add Layer", the layer does not ...
0
votes
1answer
172 views

How to apply bounding box filter in leaflet WMS?

There is a working example in leaflet site for adding WMS Layer in leaflet map at : http://leafletjs.com/reference.html#tilelayer-wms. But I don't see methods to provide the filter for bounding box. ...
2
votes
1answer
2k views

Disable leaflet interaction temporary

How can I temporary disable zoming/draging the Mapview in Leaflet.js Tried so many ways but without any luck. It's important to make it temporary and I also need the option to enable again.
2
votes
2answers
297 views

How to visualize pgRouting layer in leaflet?

I have completed all the queries of the of pgRouting tutorial by Underdark where visualization was done with the help of RT SQL Layer Plugin. As I am using Windows OS I have no access of that tool. ...