An application programming interface specific to Leaflet.

learn more… | top users | synonyms

2
votes
0answers
26 views

find inner bounds of a polygon in leaflet

How can I find the inner bounds of a polygon in leaflet? I a want to plot points randomly in polygoon but when I say Layer.getBounds() I get the bounds and I can still plot the markers ...
0
votes
0answers
18 views

Integrate leaflet module in a google maps application

Is it possible to use a leaflet application over a google maps application? What I want is to integrate a leaflet module / application over a google maps application just by passing the google maps ...
1
vote
1answer
19 views

WFS with EPSG:3301 projection using Leaflet

I am adding WFS points to Leaflet map, but don't see them on the map, however in console I see that all points I wanted is here with all properties and geometries. But the problem here is in ...
1
vote
1answer
21 views

Problem showing WMS with EPSG:3301 projection using Leaflet

I am trying to show wms layer EPSG:3301 using leaflet, but have no succes for a long time. http://kaart.maaamet.ee/wms/alus?service=WMS&version=1.3.0&request=GetCapabilities Here is my code: ...
0
votes
0answers
26 views

Leaflet.js - drag marker from popup

I am trying to allow markers to be dragged via their popup. On mobile devices the marker position to is hard to see underneath the user's finger. If an area on the popup can be designated as an anchor ...
1
vote
2answers
145 views

How to style geojson polygon using L.mapbox.featureLayer()

I have this code: var SupIncend = L.mapbox.featureLayer().addTo(map); var ArbolesAntes = L.mapbox.featureLayer().addTo(map); var ArbolesX = L.mapbox.featureLayer().addTo(map); var ...
4
votes
2answers
86 views

Plot a Raster of Weather data in Leaflet JavaScript Map without generating server-side tiles?

I want to show different weather data I have as binary arrays on a server using leaflet. But I do not want to generate tiles on the server. For each point in an a array I have the coordinates in ...
1
vote
0answers
55 views

Multiple Leaflet maps on website in different divs

I'm pretty new to leaflet.js and I'm trying to figure out how to assign the same map with the same set of options and layers to a different HTML container instead of having to remove and add a new one ...
1
vote
1answer
48 views

Geocode free APi for internal application

I need opinions / experienced use on this issue: Which API can be used to geocode an internal application of a company that meets these requirements: Can be used for company internal application ...
1
vote
0answers
65 views

How to get the total route km route using machine leaflet

I'm using machine leaflet route to draw routes I can get the total route miles ?? How can I do this? I know the class IRouteSummary http://www.liedman.net/leaflet-routing-machine/api/#iroutesummary ...
1
vote
0answers
31 views

Geocoder leaflet for internal use in the company, which take addresses from any part of the street

I am making a personal application routing to be used internally in the company using machine leaflet route. The plugin uses nominatim geocoder, but he geocodificia according to the links of the OSM. ...
0
votes
1answer
104 views

Error with Leaflet Routing Machine

I downloaded the Leaflet Routing Machine from https://github.com/perliedman/leaflet-routing-machine. Unzipped and opened the index.html in my browser to see how it looks, and got an error as shown in ...
1
vote
0answers
45 views

send viewparams geoserver using leaflet

I need to pass my longitudes and latitudes of origin and destination for a sql view in geoserver to get a WMS layer with the route. I've performed in qgis to view and is working perfectly. This is ...
1
vote
2answers
222 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
136 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
482 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
789 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
1k 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
556 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
362 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
239 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
149 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 ...
4
votes
1answer
647 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
284 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
88 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 ...
5
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
3k 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
94 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
557 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
356 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 ...
2
votes
0answers
59 views

How to draw ploygon in leaflet that use event?

Is there only one way to draw a polygon through the Leaflet.draw plugin? If you want draw anything, you must add the control ("map.addControl(drawControl);"). I want to draw a polygon on leaflet map ...
1
vote
1answer
105 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
299 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
455 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
190 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
330 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. ...