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

learn more… | top users | synonyms (1)

0
votes
1answer
19 views

wrong coordinates for wfs MultiLineString from geoserver

I have a leaflet application and I want to display some WFS layers coming from Geoserver. In Geoserver, I declare my layer with a "native SRC" EPSG:2154, and with a "declared SRC" EPSG:4326 and set ...
1
vote
2answers
45 views

Displace Lat/Long by meters

Sorry for the inflammatory title, Yes, I know these cannot be added. Problem: I have a vehicle that is reporting LL84, coordinates. It has a sensor that reports footprints of obstacles (LineString, ...
1
vote
1answer
33 views

Leaflet-ESRI code example that uses Find Task?

There's an example in the Leaflet-ESRI documentation here: https://esri.github.io/esri-leaflet/examples/finding-features.html But the code doesn't seem to actually work, neither on the example page ...
0
votes
1answer
53 views

Build a leaflet polygon(s) from GeoJSON feature(collection)

I find it quite practical to work with leaflet Polygon and it would be great to be able to build such objects directly from GeoJSON content. I did not find any Polygon constructor taking neither a ...
3
votes
0answers
51 views

Loading GEOJSON in Leaflet and separating attributes

I'm making a cloropleth map with geoJSON and Leaflet. Right now each year has a separate geoJSON file and I load each of them as below: function loadGeoJSON(data) { var json = null; ...
1
vote
1answer
15 views

Is there a way to change leaflet-gpx style?

I'm using the leaflet-gpx plugin to draw various .gpx files on my map. How can I change the color/style of it? gpxvar[{{loop.index0}}] = new L.GPX("{{url_for('static', filename='gpx/' + r )}}", { ...
0
votes
1answer
46 views

Querying subset of large ArcGIS server dataset via REST

I'm currently set up as follows: A large wetlands polygon dataset is stored in an arcgis.com account as a feature service (~395,000 polygons). I'm using the Esri-leaflet javascript library in ...
0
votes
2answers
62 views

map.on('click') limit number of pins added to map - leaflet js

I'm using Leaflet js and I want a user to be able to add a single point to the map (and not get trigger happy and add lots of pins), what do I need to do to modify the below so that this can happen. ...
2
votes
1answer
47 views

Birdseye Viewer in other applications?

has anyone used Bing Maps Birdseye Viewer tiles in other applications? I have seen Leaflet Bing but it looks like it just has aerial, aerial with labels and road tiles. Does it have birdseye tiles? Is ...
1
vote
0answers
12 views

Axis flipping in Open Layers

I have a map working using Leaflet as follows, using EPSG 2236 and a custom tilegrid. I want to switch to OpenLayers 3 so I can use the map rotation functionality but I am having trouble setting up ...
1
vote
0answers
49 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); ...
0
votes
1answer
32 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
37 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
50 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 ...
1
vote
1answer
64 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 <- ...
2
votes
2answers
74 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": [ [ ...
0
votes
0answers
28 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
32 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 ...
0
votes
1answer
71 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
36 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
88 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
90 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
36 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
35 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 ...
2
votes
0answers
103 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
44 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
25 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
41 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
40 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 ...
0
votes
0answers
12 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 = ...
0
votes
0answers
32 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
39 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
71 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
23 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
23 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 ...
0
votes
1answer
31 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; } ...
3
votes
2answers
155 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
31 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
79 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
146 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
48 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
60 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
-1
votes
1answer
31 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
47 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: ...
0
votes
0answers
111 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
23 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
42 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) ...
1
vote
1answer
67 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 ...
0
votes
1answer
37 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
26 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){ ...