An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

learn more… | top users | synonyms (1)

1
vote
2answers
34 views

Create map using Leaflet and JSON

I have a question in order to developing a web app using dynamic maps with JSON files. I'm using Visual Studio 2015 with MVC 5. At this moment i have developed complete app but I'm unable to draw ...
0
votes
1answer
1k views

Bootstrap navbar and leaflet zoom controls

I'm using the THE MAP GUY(DE) Bootstrap temple and applying it to leaflet using the code below. The issue I'm having is that the zoom-control doesn't toggle right on page load. It will only after ...
0
votes
1answer
11 views

How to add custom CSS class to leaflet tilelayer

I am working with mapbox.js and leaflet to create a map with a number of overlapping tilelayers. I want to apply some custom CSS to only selected tilelayers, and thus assign these layers to an ...
0
votes
0answers
69 views

How to get number of pixels between two points

I am working with the simple app which is using leaflet plugins.... I want to get the number of pixels when i draw a poly-line on map(from one point to another using poly-lines).... Actually i don't ...
3
votes
1answer
393 views

Leaflet.label and MarkerCluster problem with zoom dependent add/remove layers

Here's the setup: I have a leaflet map with point data, to which I have applied leaflet.label and leaflet.markercluster. I add the clustered point data at a particular zoom level (code below). All ...
1
vote
2answers
61 views

Download data from webmap made with leaflet

Can I download the data from a webmap made available from leaflet? I am referring to these dataset (https://www.vectorbase.org/popbio/map/), for which I wish to download the data for Europe? Is there ...
1
vote
0answers
153 views

Cant' get the correct measurements : LeafLet

i am working with the simple app Beta Here The application is using leaflet plugins/api.... User draw a line(poly-line) on the map/image and then enter the distance between two points.... Working ...
1
vote
1answer
77 views

leaflet.heat heat map highlighting overlapping areas

Lately I've been working on heat maps using the leaflet.heat plugin. I have a set of points in the WGS84-system with the following structure: latitude | longitude | weighting | type The ...
2
votes
2answers
19 views

Render rotated symbols in Leaflet

I have point with an attribute for each point's 0-360 direction. I need to render these points in Leaflet with arrows pointing in their respective directions. Is there a plugin or code I can use to ...
1
vote
2answers
260 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 ...
0
votes
1answer
98 views

Why are these leaflet popup values comeing back undefined?

Hi I have a leaflet map consuming a dynamic map layer on ArcGIS server. The service is viewable on the map and exposes the following attributes: Fields: OBJECTID ( type: esriFieldTypeOID , alias: ...
2
votes
1answer
220 views

Leaflet removing labels when any popup window is shown

I am newbie to leaflet and i found the following solution to add static labels to features in my map: L.CircleMarker.include({ bindLabel: function (content, options) { if (!this._label || ...
2
votes
1answer
246 views

Draw heatmap only over water layer using Leaflet?

I need to draw a heatmap, but only over water because I want to represent water heat level. I am using Leaflet. How can I do it? I found an only-water layer, maybe it would be usefult for developing ...
1
vote
2answers
168 views

Cartogram plugin for leaflet or OSM

Does anyone know if there is a plugin to make cartograms for leaflet? I have sets of geotagged Twitter datas and I'd like to distord the map according to the density of tweets of every area of the ...
1
vote
0answers
138 views

how to bind custom marker controls to map : leaflet

I am working on map control app using leaflet plugin .... I added a custom button for marker in side toolbar.... Target I want to put marker on map when i click on that button....in other words i ...
0
votes
0answers
7 views

Features disappear from Leaflet after zooming in

I have a Mapbox studio template which already looks the way I want it to, but when I put it in a Leaflet app, after I zoom in past level 17, a lot of the features disappear. Zooming in inside Mapbox ...
2
votes
1answer
220 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
3
votes
2answers
79 views

Get tile layer intensity at given zoom and longitude/latitude (Leaflet)

I can display a tile layer as an overlay in Leaflet via an url of the form path/to/my/tile/layer/{z}/{x}/{y}.png : my_overlay = L.tileLayer('http://path/to/my/tile/layer/{z}/{x}/{y}.png', { maxZoom: ...
1
vote
2answers
89 views

Leaflet output is grey

I would like to implement leaflet in shiny with R. I try to go with the simple examples I found online: library(leaflet) library(ggmap) somePlace <- ggmap::geocode("Vienna") # Information from ...
0
votes
0answers
22 views

Markers display with leaflet and javascript

I have a problem displaying data relating to schools on a div 'info' when click the marker with leaflet and javascript: here's the error: Uncaught TypeError: layer.setStyle is not a function
-3
votes
0answers
16 views

condition that displays two div different with leaflet [closed]

I wanted to create a condition that displays each time according to different div click on the data on the map
0
votes
1answer
13 views

Leaflet push GPS position to array onLocationFound and search a squared area around this position

So I have this approach of pushing the coordinates of a location to an array: var gpsposition = [], function onLocationFound(e) { gpsposition.push(e.latlng);} Now I have the following questions: ...
0
votes
0answers
70 views

Calculating pixels in leaflet

I am working with leaflet plugins, calculating distance between two points of a polyline or whole distance of joint/multiple lines Work : I set up the script to measure the distance in meters when ...
3
votes
1answer
459 views

Leaflet custom div & click propagation on other elements

I've gotten custom HTML applied successfully within my #map element (where Leaflet is appended) but I'm having unusual behavior with other Leaflet objects that find themselves within the transparent ...
5
votes
3answers
53 views

Different values while calculating distance

I'm developing a project using LeafleatJS and PostGIS. Currently I'm getting trouble while calculating distance between two coordinates. For example: Point 1 - lat: -12.99835864475412, lng: ...
2
votes
0answers
40 views

Can we set the latlng start point : leaflet

I am working with the leaflet api. I am trying to figure out how to change or set the latlng start point in leaflet map. Currently i am working on use image as map,,,,the latlng(0,0) is at the ...
4
votes
0answers
52 views

Is it possible to use a raster::click event within an interactive leaflet map?

Data Download: https://www.dropbox.com/s/f849ra8l6umo9d8/crops.tif?dl=0 I have various raster images of the world that I would ultimately like to plot within an interactive leaflet map; an example is ...
-1
votes
1answer
34 views

CartoDB Point Clustering and on Hover

I have been working from a sample on point clustering from cartodb. I would like to have an infowindow show when someone hovers over a series of points. This infowindow will display a different ...
2
votes
1answer
18 views

Can reference system in Leaflet be changed without disrupting data position?

I have a leaflet map that uses default CRS (EPSG3857) with multiple markers placed on it. Their LatLng are read from JSON file. I want to change map CRS to Simple, keeping markers on exact same screen ...
1
vote
1answer
281 views

Pass coordinates parameters to geoserver pgrouting service from Leaflet wms tile layer

I've configurated a pgRouting service in Geoserver, following the steps on the documentation it's easy to accomplish. Reading the documentation, existing examples, etc.. I've come to undestand how ...
0
votes
0answers
123 views

redraw canvas when add new overlay?

How to redraw canvas when I add overlay layer? Firstly load osm map, then creates canvas. So when I push the botton and add another layer it looks like sandwich and canvas in a middle...first layer - ...
1
vote
0answers
13 views

Leaflet printing does not show pins and map is shifted

I don't exactly why but whenever I try to print my leaflet map with layers, it shows the map a little shifted to the left as well as the pins are not quite ok. I tried using easyPrint() and ...
1
vote
1answer
1k views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
1
vote
0answers
18 views

Non-HTML circle text labels on Leaflet map

I need to save image of Leaflet map with polygon, multi-polygons, circles and text below every circle. I have geojson file with circle and polygon coordinates (lat and lng). I managed to get image of ...
2
votes
1answer
24 views

Invalid Geojson when drawing multipolyline on the map

I try to display multi line in the map but it return "Error: Invalid GeoJSON object" Here is my code $.ajax({ type: "POST", url: "server/drawPipe.php", ...
1
vote
1answer
180 views

Leaflet + GeoServer + British National Grid

I have followed along some examples and was able to display BNG 27700 data nicely on the map, however now I want to perform getFeatureInfo function on click. Again the code I used is as below: var ...
1
vote
1answer
196 views

CartoDB JSONP callback in leaflet-search plugin

long time reader, first time question-asker etc... So I'm trying to implement a search function on an app I'm building using data from cartodb in leaflet and this leaflet-search plugin: ...
1
vote
0answers
47 views

Scale (or stretch) Leaflet map tiles to look bigger

I am using leaflet and I am using the same tile provider as the main openstreetmap's website (http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png). However, leaflet seems to fit many more tiles in 1 ...
1
vote
0answers
15 views

Leaflet polyline not working

I'm trying to draw polyline to connect an array of waypoints. But I'm getting an empty div like this instead of a map with route. My code is this: <script> // set center ...
2
votes
1answer
47 views

Leaflet Routing Machine: how to dinamically change router settings?

I'm using Leaflet Routing Machine in a litte Leaflet + Javascript map. I'm using Graphhopper as router in this way .... var control = L.Routing.control({ waypoints: [ L.latLng(57.74, 11.94), ...
2
votes
1answer
505 views

Z-Index in GeoJSON features using leaflet

I have a watershed polygon with sub-watersheds contained within the larger watershed. I would like the sub-watersheds drawn on top. Can i control the drawing order of features within a geojson object ...
0
votes
1answer
560 views

Leaflet geoserver wms doesn't show on google map base layer

I have a site running Openlayers (base layer google and overlay wms in epsg4326 from geoserver). The site works fine. I've decided to try doing the same with leaflet , and from some reason I can't ...
2
votes
1answer
291 views

Load Leaflet map in canvas element

I am working with leaflet tiles loading tiles to a map div http://jsfiddle.net/tBCd5/ I am now playing with some html5 canvas distortions like below http://jsfiddle.net/UF4PK/ It would be cool to ...
2
votes
1answer
27 views

Convert/display grayscale image as RGB

i want to display raster images using a color palette in a leaflet map. The images are tiled (gdal2tiles) from a single .tif to multiple .png files with values from 0 to 100. I add the image using ...
1
vote
0answers
10 views

Leaflet _onDrag throws TypeError: this._positions is undefined

I am creating a map using the MapQuest API with Leaflet. Up until today the map worked fine in development and no errors were being shown in FF dev console. This morning when I was giving a ...
1
vote
1answer
496 views

Leaflet update getcenter coordinates

I am bringing in leaflet routing control into my map and I would like to have the route icons show up in the center of the current view. using the code below I can get the icons to show up at the ...
0
votes
1answer
278 views

map.on('click') event disables the double click zoom

I have a map that has an onclick event fired and displays a marker where the user has clicked. Problem is that this event seems to overrun the double click event. Because of this, when I double click ...
3
votes
1answer
78 views

Using MSID/MID with leaflet to display Google My Maps data

I'm wondering if there is a way to display MSID/MID with leaflet. I found this forum below; Any way I can load KML data from Google maps (again) via JS API? KMZs work fantastically with the arcgis ...
1
vote
2answers
25 views

Remove layer switcher controller in leaflet

I have created a map in leaflet and added an overlay as: map.layerscontrol.addOverlay(tile_layer,"{{ resource.title }}"); map.addLayer(tile_layer); The map shows great and the layer as well. Now I ...
4
votes
1answer
33 views

How can I change popup position on leaflet marker?

I want open a popup on bottom of my marker icon in leaflet. my code: var mymap = L.map('mapid').setView([51.505, -0.09], 13); ...