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

learn more… | top users | synonyms (1)

1
vote
0answers
144 views

GeoServer TMS with leaflet coordinates are different

I use the example tiger-ny layer from geoserver with leaflet like this: var map = L.map('map').setView([62.92578, 32.08523], 13); L.tileLayer('http://localhost:8080/geoserver/gwc/service/tms/1.0.0/...
0
votes
1answer
75 views

How can I add a new layer, then remove previous layer from a Leaflet/CartdoDB map without the map clearing everything

I am new to CartoDB/Leaflet. Here's my fiddle... http://jsfiddle.net/zippyferguson/fLkqgf4q/1/ If you click the play button, I want it to load data to the map year by year from 1966 to 2015 from a ...
2
votes
1answer
67 views

How to make Leaflet maps accessible and WCAG2 compliant

I have followed several threads on this topic but have not been able to fix the following issues: How to prevent Leaflet map tile images names from being read out by screen readers? How to make ...
1
vote
1answer
188 views

Leaflet with Geoserver in background to slow for GeoTiff

I am implementing a leaflet web-map application to display several GeoTiffs. The GeoTiffs are each ~300MB and published by Geoserver as WMS. In Leaflet I add them through L.tileLayer.wms. I also ...
2
votes
1answer
155 views

How to use Igraph with leaflet for R?

I try to draw a graph in map with R code : df<-data.frame("from" = c("Lyon", "Toulouse", "Paris", "Marseille"), "to"= c("Paris", "Paris", "Marseille", "Toulouse")) meta <- data....
2
votes
2answers
503 views

Calculating bounding box of given set of coordinates from Leaflet Draw?

I have values generated from Leaflet Draw plugin that look like this: { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [-73....
0
votes
0answers
41 views

Pivoting around Geojson variable symbology in Leaflet Map

I currently have geoJson loaded in to a leaflet map where I want to change the variable symbolised. The symbology rules can all be the same for each variable visualised. I need to find a way of ...
0
votes
1answer
53 views

Conflicting layer styles for geojson in Leaflet map

Assigning a style to a geojson layer but it is visualising with the aforementioned style as well as the default blue style assigned to geojsons. Can't work out what is causing <!DOCTYPE html>...
1
vote
1answer
721 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...
0
votes
0answers
84 views

Having trouble getting geojson to show up with leaflet from geoserver

I have enabled jsonp in geoserver/WEB-INF/web.xml. It appears in my layer preview in geoserver. I cannot seem to get my geojson layer to show up in my map. The tiles show up but with no layer. Not ...
0
votes
2answers
347 views

Toggle geojson labels using control with leaflet

I am attempting to create my first leaflet map. I am using OpenStreetMap tiles and adding geojson features as overlay layers. I have been following tutorials with much success, until I started trying ...
0
votes
0answers
309 views

MapBox GL JS, TileStache and Leaflet

Is it possible to use MapBox GL JS to render vector-tiles in a Leaflet map, without the access token? Even if the map object itself, does not come from Leaflet directly, but it's the wrapped MapBox ...
1
vote
1answer
81 views

Multiple Leaflet TileLayers with extended maxzoom

I've got 2 layers(for indoor and outdoor) in my web application. If i zoom beyond 19, the indoor layer should be displayed and the outdoor layer tiles will be scaled up, because their maxzoom is 19. ...
0
votes
1answer
81 views

Leaflet geoCSV Popup Customisation

I am currently using the leaflet geoCSV plugin to bring through CSV data into the map frame. I am struggling to be able to customise the popup to only show certain attributes of the CSV and different ...
3
votes
0answers
278 views

GeoJSON not showing in leaflet map?

I'm trying to load a geojson file in to my leaflet map and can't see what's going wrong. From looking at other questions i've used Jquery Ajax to call the geojson. The geojson is in the same directory ...
0
votes
0answers
97 views

Leaflet - divIcon size options are not applied

I am using a divIcon (an svg) for markers given to a point layer from a geoJSON for a map built with Leaflet/Mapbox. I can set the (initial) icon size with a css class, but if I try to set the ...
0
votes
0answers
38 views

KML NetworkLink/Region and Leaflet or OpenLayers

I have a kml with region and networklink that works fine with google earth and Google Maps API (apparently via a call to KMLOverlayService). The structure is somehow a quadtree structure. The top ...
1
vote
1answer
127 views

Leaflet js circle doesn't showing on map

I have a leaflet js app that use circle. It works fine when i dont put the script to my html template (I use SingApp template). But when i integrate the script to template, circle does not appear on ...
3
votes
1answer
83 views

Leaflet geojson styling leaves gaps between polygon

I'm styling a geojson polygon composed of multiple closely placed vertical segements which doesnot have a gap in between (i've checked the topology). I want to display just the fill and without stroke....
0
votes
0answers
31 views

Leaflet geoJSON point layer with divIcons (SVGs) how to toggle visiblity?

I have posted a few related questions about this topic here here and here. I have tried to set the opacity of the layer, then reset it with setStyle on a zoom event like so: Layer18 = L.geoJson(...
0
votes
0answers
91 views

how to add multiple divIcons to each point in a geoJSON - Leaflet

I am trying to add divIcons (SVGs) as markers to a point layer from a geoJSON in a webapp using Leaflet. I need to have different sized markers at different zoom levels. I have asked related ...
0
votes
1answer
75 views

Embedding a Leaflet map on a website

What are some ways to embed a Leaflet map onto one's website? I've explored other posts that mention iframe, and plugins like MapsMarker. But, what is a step-by-step way to do it? My site uses a ...
0
votes
0answers
237 views

Leaflet / JQuery -cannot add or remove class to divIcon marker

(this is related to a previous question of mine) I am adding a divIcon (an svg) as the icon for features in a geoJSON, using Leaflet. I can add a class to the html property of the icon, but I cannot ...
0
votes
1answer
58 views

using photon in leaflet outside the map

I'm using the leaflet plugin photon to request adresses like here : https://adresse.data.gouv.fr/map/ It works fine and the geocoder was added to my map. Now I would like to put the geocoder outside ...
0
votes
1answer
40 views

Leaflet layer spy

OpenLayers3 has a really neat layer-spy example. The source code for the example indicates it uses the precompose and postcompose event listeners for an ol.layer.Tile: var imagery = new ol.layer.Tile(...
0
votes
1answer
160 views

Getting current layer in control event of Leaflet?

Can I get the current layer in control's event? if (obj.overlay) { input = document.createElement('input'); input.type = 'checkbox'; input.defaultChecked = checked; } ...
4
votes
2answers
596 views

how to display simple arrow on the map in R using Leaflet

I try to display an arrow on the map using R and the leaflet package, code of map see my related question: # install packages install.packages(c("rgdal", "maptools", "leaflet", "htmlwidgets"), ...
0
votes
2answers
88 views

change easy.button to get the location of user

I want to add a button to my leaflet that zooms to the position of the user. i cant figure out the right way. This is what i tried: L.easyButton('<img src="myimage.png">', function(btn, map){ ...
0
votes
1answer
232 views

CartoDB layer not showing up on over mapbox layer but legend is

Currently, the legend is only displaying but not the layer. NOTE: I am trying to run the web map on a bootstrap modal, hence you will see: $('#webmap-modal').on('shown.bs.modal', function() in the ...
3
votes
2answers
418 views

Generate HTML file with R using Leaflet

I try to display the France map on HTML with RStudio; I followed the tutorial to the World card in Creating an interactive map with leafle; Example works. I wanted to do the same just by displaying ...
2
votes
1answer
121 views

Is it possible to show Leaflet Marker Cluster with JSON API?

I have a problem with displaying Leaflet Marker Cluster working with Leaflet-layerJSON. There are markers, but I cannot show the clusters. This works with GeoJSON, but now I have different data ...
0
votes
1answer
155 views

How to show label over markers on leaflet?

I need to show label over markers on leaflet to make it readable. How can I implement it? See the picture below label is overlay-ed by marker
0
votes
1answer
56 views

How to set Layer's options' title?

How to set Layer's options' title? I want to identify each layer var overLayers = [ { name: "Bar", icon: iconByName('bar'), layer: L.geoJson(Bar,{onEachFeature: onEachFeature}), group: ...
1
vote
0answers
189 views

How get layerID or Layer name from marker

I can get marker but I want to get the layer ID or name from markers so as to filter markers. var overLayers = [ { name: "Bar", icon: iconByName('bar'), layer: L.geoJson(Bar,{...
0
votes
0answers
489 views

resize divIcons (svgs) at zoom levels - Leaflet

I am adding a geoJSON to a map using a custom divIcon (from svg) for point markers with Leaflet. The divIcon needs to resize on different zoom levels. Currently I can see the icons and the popup ...
0
votes
1answer
52 views

Leaflet: how can I find all geo-json features at a certain position

For a small project we are using leaflet with geojson features instead of openlayers backed by geoserver. Now, when I click in the map, I want to see a list of all features in that position. I use ...
1
vote
1answer
198 views

how to get map object in event?

I add a listener to a button L.DomEvent .addListener(selectList, 'click', L.DomEvent.stopPropagation) .addListener(selectList, 'click', L.DomEvent.preventDefault) .addListener(selectList,...
2
votes
1answer
175 views

Adding a Mapbox Studio basemap to leaflet

I am using Mapbox Studio, customized a nice basemap, and downloaded it. It downloaded as a .json file with a couple thousand lines of code. I want to be able to use this basemap (called basemap....
0
votes
1answer
85 views

Leaflet zoom to polygon

I receive a polygon layer in Leaflet via ESRI REST. (similar to here ) I want to have a menu where I can zoom to specific polygons. (one button per polygon) How can I do that?
0
votes
1answer
45 views

Open new Tab with L.EasyButton

I added an L.EasyButton to my map. Now I want it - by clicking - to open a new tab with a specific address. I tried this but it did not work: L.easyButton, function(btn, map){ onclick="window....
4
votes
1answer
202 views

Error with .eachLayer in leaflet.js

I'm trying to add popups for point icons using Leaflet.js and ran into this error: "Uncaught TypeError: points.eachLayer is not a function" Here's my code: function addPoints(data){ for (var ...
0
votes
1answer
200 views

Animated GeoJSON layer in Leaflet

In a leaflet application, I have a base map, and several overlay layers, each of which are showing GeoJSON. The GeoJSON is going update (client receives over a websocket) at 4Hz. The GeoJSON ...
2
votes
2answers
808 views

How to tell if a GeoJSON path intersects with another feature in Leaflet?

I have an application where the user draws a path (a series of connected straight lines) and this path may not intersect any feature in a particular GeoJSON layer. I need to check that no point along ...
2
votes
1answer
350 views

Zoom to GeoJSON point feature in leaflet

I'm relatively new to Web Mapping and trying to develop a litte Application with Angular JS and the angular-leaflet-directive. In this application I will work with a GeoJSON point layer representing ...
-1
votes
1answer
56 views

Change the center point of leaflet

By default zoom to, setview functions show the center point of the map in the center point of div measured by pixel of browser. I want to show the center at slightly right when left panel is visible. ...
0
votes
0answers
59 views

Searching for more than one propertyName?

how can i search for more than one propertyName? This is my code: var searchControl = new L.Control.Search({layer: mylayer , propertyName: 'myfirstproperty' , circleLocation:true , zoom: 15.0}); ...
2
votes
1answer
93 views

Tiles from gdal2tiles won't appear on leaflet map

I added the OSM tiles and my tiles(193ortho) which I am serving from the same folder that html file is in, but the tiles I made won't appear. The tiled images appear fine in the webviewer that is ...
1
vote
0answers
65 views

How to draw a raster over the World using Postgis

Im currently working on a system to track user interaction on mapwidgets. Now i need to visualize the bounds that users are looking at on the map. Since were using a whole lot of data i need to find a ...
1
vote
1answer
45 views

Leaflet CRS and PostGis

From the Leaflet.js documentation it states that it uses a default CRS of 3857. This implies that if I am going to generate points with PostGIS based on polygons, or points created by drawing or ...
1
vote
0answers
36 views

Same behaviour for minzoom for google maps api and leaflet

I need to implement the same behavior for leaflet and google maps for the case of minzoom. Google maps duplicates all the objects from the main map to the world`s copies, however leaflet doesn't since ...