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

learn more… | top users | synonyms (1)

1
vote
0answers
38 views

Leaflet map with 'query of features' on mouseover and multiple layers

I have produced two working Leaflet maps that in total contain the features that I need for my application. However, I cannot solve how to have multiple 'overlay' layers that can be queried with ...
0
votes
1answer
13 views

how do I map from a mapbox map or tile to the lat lon extents of the map?

A web app I use displays map tiles from mapbox and then uses leaflet to overlay that map with an svg path representing a route. The problem is that the area given to the map is very tiny, it's short ...
0
votes
0answers
40 views

Debugging Uncaught SyntaxError: Unexpected token : from WFS in Ajax request?

I am trying to insert a WFS layer into a Leaflet map; therefore I need to enable jsonp and want the output in json/geojson so Leaflet can consume it. However, I keep getting an error that I suspect is ...
1
vote
1answer
56 views

How to load html file with leaflet map using PyQGIS

I have simple .html file with leaflet map layers. I want to load these layers in QGIS mapCanvas with ability to choose one of the layers. How can I load this .html and show one of map layer with using ...
2
votes
2answers
36 views

Can't continue scrolling on mobile devices when a map occupy all the screen

We have an issue on mobile which is the user can't keep scrolling if the there is a map on the page and it occupies the whole screen. Here is the code: // center of the map var center = [-33.8650, ...
0
votes
1answer
31 views

Non-Earth maps, tile server and scale in leafletjs?

I am looking at putting together a tile server for other astral bodies, such as Mars and the moon. At the moment I am using leafletjs and the Control.Scale at the client end (though could be any ...
2
votes
2answers
47 views

Leaflet filled contour map

I have evaluated the Getis-Ord Gi*-spatial statistic for each point in my map. Like this, each point is assigned a Gi-score and due to this a certain color, as you can see in the image below. What I ...
0
votes
1answer
40 views

Display Popup from postgis db over WMS layer file using leaflets?

i want to display popup information over WMS service file that i published from geoserver and using it Leaflets. Below is the picture for illustration. Now i just want when user click any polygon ...
1
vote
1answer
6 views

How to specify (cross-browser) mouse pointer sets on leaflet control?

Leaflet custom controls might be interactive, when the user can use the mouse on them to perform an action, or non-interactive, when they are used only to show information. This should affect the ...
1
vote
1answer
32 views

Where to get world-wide detailed administrative boundaries?

I'm looking to build a world map that plots all application users and their locations around the world. The initial zoomed out world view would show total numbers clustered by country, then when you ...
1
vote
2answers
54 views

Issue in loading external geojson file into leaflet map?

I want to load an external geojson file into leaflet map. I created a global variable (i.e. tracts) for json file and referenced this variable in the script file. But i receive an error message that ...
0
votes
1answer
43 views

OSMBuildings building:levels are not working

I am integrating Leaflet with OSMBuildings and i am using Classic 2.5D. Everything is working and it is showing 3D building on 2D Map, But The Building levels are not working (I am gone through this ...
3
votes
0answers
34 views

CartoDB.js/Leaflet map - how can I click between multipolygons cleanly?

Here's my map: https://jsfiddle.net/Sidders/4exf969e/3/ I want to apply a click and hover effect to the polygons. So a polygon/multipolygon highlights on hover, and is selected with one click. The ...
1
vote
1answer
56 views

How to start L.Control.Geocoder.nominatim() with user's current location

I'm trying to develop a routing system and I want to know how can start with the user's current location from A point? var control = L.Routing.control({ // waypoints: [null], waypoints: [ ...
3
votes
1answer
82 views

Rotate geojson feature with Leaflet

I have a GeoJson feature that is rendered with leaflet and proj4(ESPG:31467). Now I want to rotate that feature so that it NW corner points to NE, e.g. 90 deg rotation. Is there a way to do this? Or ...
0
votes
0answers
29 views

How to add mutiple photos from flickr API on the popup of leaflet.js markers

I want to make a slider of photos on the popup of the markers by taking 5 photos for each location.I have a JSON of few locations of a city.The json has the name, latitude and longitude of the ...
0
votes
1answer
22 views

Leaflet Tiling with epsg4326?

i'm using leaflet to render a map on my site. The problem is, i use mongoDB to perform some geospatial queries serverside, which use as standard the infamous epsg4326. It appears that on leaflet ...
3
votes
1answer
79 views

How do I set the width and height of a popup using QGIS2Web and Leaflet

I am a newbie to editing javascript. I want to set the Max width and height of the popup that QGIS2Web generates with a Leaflet map (I have quite a lot of text in the attributes and will need a ...
1
vote
1answer
27 views

Access Stamen tiles via https

To get rid of "Mixed content" warnings I'm trying to access stamen map tiles via https. For http the used url is: http://{s}.sm.mapstack.stamen.com/(toner-lite,$fff[difference],$fff[@23],$fff[hsl-...
0
votes
1answer
27 views

Leaflet - MultiPolyline constructor and arrays in JSON

I am struggling with the AntPath Plugin ( link to GitHub ) for Leaflet and the documentation is limited and difficult to read. This setup works well(se code-snippet in the end), but instead I want to ...
1
vote
1answer
21 views

Leaflet: Style function does not work for point layer

I'm new to Leaflet and I'm not very proficient in Javascript. I've been trying to create a map visualizing a point layer with custom markers but for some reason the marker style as a function just ...
1
vote
2answers
57 views

Leaflet, changing base map CRS

So i am using leaflet in order to create my project, which is a world map that certain layers would be add on top of it. I am wondering whether I should change the CRS property of the map object, ...
1
vote
1answer
42 views

Leaflet / Mapbox.js: incorrect Popup offset using divIcon with CSS class

I'm having an error which I can't seem to find elsewhere online with Leaflet / mapbox.js regarding the offset of a popup from a marker's custom icon which has been set with L.divIcon and using a CSS ...
0
votes
0answers
26 views

Parallel visualizing in leaflet shiny

I want to visualize a large number (about 27000) of lines (streets of Amsterdam) on a base map (of Amsterdam), using leaflet and shiny in R. The opacity of these lines changes when a slider is moved. ...
2
votes
2answers
214 views

How to get current scale of a Leaflet map?

I've been looking through the Leaflet API to see if there is a getScale method or scale property of a map, and have't seen anything. Does anyone know if Leaflet provides a way to get the current map ...
0
votes
1answer
23 views

Export csv-coordinates to JSON - square brackets [closed]

I´ve got multiple point-layers that I want to join in a single JSON-file used for webmapping. The layers is to be listed in column by column like this: [55.778659,12.151137 ], [55.77272358,12....
0
votes
1answer
61 views

Create buffer around point with Turf

This code is not working and I don't know why? function getlatlong(b,d){ return b,d; } function buffer(feature){ var point = { type: 'Feature', geometry: { type: 'Point', ...
1
vote
1answer
44 views

Displaying raster images using Leaflet?

The purpose is to create a small web application using an open source product, preffered Leaflet (but I will Switch the product if it works within another Framework than leaflet), simply showing a ...
0
votes
1answer
41 views

What SRS does leaflet use when it creates new markers?

I'm using leaflet 0.7. I'm wondering what spatial reference system is used when a new marker is created? Also, how does this impact my use of maps? (I'm using leaflet .7 because of dependency ...
1
vote
1answer
69 views

Realtime in Leaflet with Socket.io

I'm trying to get events on the client side and showing changes (new markers) in realtime on a leaflet map with socket.io. The problem is in defining data that comes from socket.. I don't know the ...
1
vote
1answer
36 views

Leaflet subdomains: if subdomain is down, attempt another

When giving leaflet an array of subdomains for a tile layer, how can I cause it to try a different subdomain if the attempted subdomain is down? For instance, adding this layer: var map = L.map( '...
0
votes
1answer
34 views

Projections leaflet and OSM

I downloaded data from OSM and extract lat/lng coordinates from a user who is clicking on a leaflet map. So my program returns the coordinates where a user clicked! I am wondering what crs I need to ...
1
vote
1answer
50 views

Is it possible to cluster polygons in Leaflet?

Is it possible to cluster polygons in Leaflet? In a similar way to the Marker Cluster plugin
1
vote
2answers
54 views

Is there an editor for Leaflet JavaScript that has intellisense functionality?

Is there an editor for Leaflet JavaScript that has intellisense functionality? I've tried both Visual Studio 2015 and Visual Studio Code ... in 2015, if I type code like var geojsonlayer = L and ...
2
votes
1answer
53 views

How in-sync is the MapBox flavour of Leaflet with the FOSS version?

How in-sync is the MapBox flavour of Leaflet with the open source version? I'm concerned that if I got with the MapBox sku, I'll be locking myself into a non-standard version, so things like ... are ...
3
votes
3answers
141 views

Automatically refresh my wfs layer in Leaflet when adding data in Postgis

I’ve built a web-sig based on postgis, geoserver and leaflet. My polylines, …, are stored in Postgis and I call them through Geoserver in Leaflet as wfs layers like : var defaultParameters = { ...
0
votes
1answer
54 views

Leaflet Map Layout

I have been learning how to use leaflet recently and have create a number of maps which have all been full screen maps. I would like to understand how I would place other features on a web page along ...
0
votes
0answers
33 views

How import variable from leaflet.markercluster

Maybe someone can help me... How i can import variable from leaflet.markercluster if i using webpack. I can't find class, which i can import. https://github.com/SINTEF-9012/PruneCluster
0
votes
2answers
31 views

How to access array inside of Leaflet LayerControl?

When you make a Leaflet LayerControl you first make an array of markers, then pass the array to the LayerControl constructor and add the LayerControl to the map, like this: myLayerGroup = L....
0
votes
0answers
41 views

How to make leaflet image overlay draggable?

I simply want to make a georeferenced imageOverlay draggable in leaflet. I found several unanswered posts (e.g. here and here). Since it is easy to make markers draggable, someone tried to adapt the ...
1
vote
3answers
46 views

Is it possible to limit the records retrieved from a GeoJSON file?

Is it possible to limit the records retrieved from a GeoJSON file? I have a data file in GeoJSON format that my Leaflet page loads from a local text file and displays as a series of markers But it's ...
0
votes
1answer
45 views

Cannot get L.control.coordinate to work properly

I am trying to make a map modal with Leaflets that displays the lat./lng. coordinates in a box when the user clicks on the desired point. I got the popup given in the Leaflets tutorial to work fine ...
0
votes
0answers
13 views

how to update control content when adding it to map in leaflet

I have a control which displays its content based on the current map position. In the onAdd method I create its components but cannot style them using jquery methods (likely because they are not fully ...
0
votes
2answers
64 views

Thematic charts on leaflet

In GIS charts are a part of good visualisation , I wonder if I can show a bar chart for example of my ON , OFF passangers in some Bus line here my plunker example my example each stop nodes point has ...
0
votes
0answers
14 views

Leaflet renders big lines

On opening the page i get this type of view.The lines are very thick. On clicking anywhere in the map it changes to 2nd picture.I am not being able to figure out why this is happening.
1
vote
1answer
35 views

Using createLayer in CartoDB isn't working

So, the scenario is I have a situation where users can look up multiple tables worth of data, and want to view them in an aggregate fashion. Based on certain filters, I get a list of tables then want ...
1
vote
1answer
18 views

Show html page(from different file) inside a leafleat marker

I am developing a web application and I would like to be able to show a full web page inside an L.marker popup window with fixed size... Until now I figured out how to run some php or html in the ...
0
votes
2answers
25 views

Leaflet: Change displayed column on click

I have a GeoJSON layer in a Leaflet map showing buildings. The columns of the buildings layer contain electricity usage info by date (eg., the column 12052015 contains electricity usage on Dec 5, 2015)...
2
votes
1answer
65 views

How a draw a circle (on the surface of earth) on a mercator projection?

I would like to use R and leaflet to draw a circle (a real circle on the surface of the earth) on a mercator projection. In the following code, I have the center of the circle (with lng=0 and lat=60),...
2
votes
2answers
91 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 ...