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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Animated GEOJSON path invisible in Leaflet

i have been trying to animate a path over a leaflet map using the following example from Mike Bostock: http://bl.ocks.org/zross/6a31f4ef9e778d94c204 After i make my own json and put it into code, i ...
1
vote
0answers
15 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
9 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
15 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
42 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
17 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
18 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
32 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
24 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
5 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
22 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
35 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
22 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
26 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
votes
0answers
29 views

Leaflet & Cesium integration for 2D & 3D view [closed]

I'm not a developer, but please allow me a question. I try to create an interactive map (non-profit) in Leaflet with old town plans (WMS) and add a layer for historical photos (Geotagged Photo Leaflet-...
-3
votes
0answers
15 views

display buffer turf only when i click on a layer [closed]

I want to display turf buffer only when I click on a layer var pt = { type: 'Feature', geometry: { type: 'Point', coordinates: [lat, lng] }, properties: {} }; var unit = 'miles' var ...
-1
votes
0answers
11 views

Leaflet layer on ol3 map [closed]

I am using normally ol3. But I had to put leaflet layer on ol3 map Is there any way to overlay leaflet layer on ol3 map? Regards.
1
vote
1answer
38 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: [ ...
-1
votes
0answers
26 views

How to add two buttons on waypoint to run the code

I'm developing a mobile app and I would like to add one button in each waypoint to be able to run the code. var geocoder = L.Control.Geocoder.nominatim() L.Routing.control({ geocoder: geocoder, ...
3
votes
1answer
68 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
22 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
21 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
44 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
20 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
17 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
19 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
36 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
20 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
19 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
129 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
20 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
53 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
35 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
30 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
37 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
26 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
31 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
34 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
44 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
48 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
0answers
19 views

div 'map' in 3 part [duplicate]

I wanted to split the div 'map' of 3, part contains the map, another the legend and 3rd layers with leaflet image
3
votes
3answers
83 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
48 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
23 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
25 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
32 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
41 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
30 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
12 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
53 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 ...