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

learn more… | top users | synonyms (1)

1
vote
3answers
7k views

Dynamically set zoom level based on a bounding box

I have a leaflet map whose size depends on the size of the browser window. I would like the zoom level to be dynamically chosen so that it is as zoomed in as possible while showing the entirety of the ...
0
votes
1answer
47 views

Modifying the the Find Task in ESRI-Leaflet?

I'm trying to figure out how to modify the Find Task in ESRI-leaflet so that when the user types in a new text for search, the old selection is cleared. Currently, when you "find" one feature (For ...
3
votes
1answer
73 views

Leaflet map loads incorrectly when inside a Bootstrap .collapse element

I'm trying to create a Leaflet map which is hidden when the page loads, and revealed when the user clicks a button. I'm trying to use the Bootstrap collapse functionality to reveal the map on a ...
1
vote
1answer
46 views

Defining and including local tileLayer in Leaflet

I have a problem with including path of the local tileLayer (generated in OpenStreetMap) in Leaflet. Here is the code in which I define path to the map.png var map = L.map('map', { zoom: 8, ...
0
votes
1answer
36 views

How do you toggle between layers that have been loaded using the FileLayerLoad.js?

I'm trying to toggle between geojson layers that were loaded using the filelayerload javascript. Right now I'm basically stuck on how to append the geojson layers to one variable once they have been ...
1
vote
0answers
24 views

Can MapboxGL use nearest neighbour interpolation for overlay image? [closed]

In HTML+CSS version of mapbox/leaflet I can set image-rendering option for .leaflet-image-layer with CSS to choose interpolation method. How can I make this in GL renderer?
0
votes
3answers
179 views

What are the low cost options for converting FLEX API based web mapping applications to any other platform? [closed]

As flex is reaching the end of its life, I have one project to convert Flex based web mapping application to any other possible solution with minimum development effort and secure way. I believe Dojo ...
1
vote
0answers
29 views

Using DOM to make custom Leaflet control error

I'm using DOM to create a custom leaflet control that opens a bootstrap modal with a form. There are two DOM created buttons on the left the of the map. Each button should be linked to their own modal ...
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 ...
1
vote
1answer
93 views

TypeError: jsonFeatures.map is not a function using fuse-search in leaflet js

Trying to implement the fuse-search functionality in a leaflet map, however I am getting a TypeError: jsonFeatures.map is not a function. Here is my javascript part of the code: var map = ...
1
vote
1answer
35 views

How can I avoid self-managing z-index on leaflet popups

UPDATED INLINE Using Leaflet 0.7 (but I would like to move to 1.0 Beta 2) - NOTE, I do not have this problem in 1.0, beta 2. I have a leaflet map with two tile layers (mapbox, and my own) one ...
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 ...
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 ...
0
votes
1answer
65 views

How to load POI based on map movements?

I'm currently creating a new website based on geo-localised informations, which is quite new to me. I need to display my points of interest according to where the map is, and where the user make it ...
0
votes
1answer
88 views

How to overlay Image to openstreetmap using leaflet.js

I want to overlay a wide range satellite image onto openstreetmap using leaflet.js. The satellite image is in Equidistant Cylindrical Projection. This is how I initiate the layer. ...
0
votes
1answer
37 views

3D map with OSM2World

I want to create a 3d map and have found the osm2world converter. But i do not understand whether I can use it to convert the whole world map from 2d to 3d, for example on 17th and 18th zoom levels, ...
3
votes
0answers
687 views

Leaflet: Linking a marker click event to an image

I'm breaking down my question into three parts. I am a beginner to Leaflet and to writing code. Currently, I have a JSON file with all of my markers linked to my map page. The idea is that every ...
1
vote
1answer
35 views

Leaflet fitBounds Starting Position

I am creating a Leaflet application that uses the code from the Simple CSV template to set the bounds of the map to the selected markers. The issue I have is that I want to set a start position that ...
2
votes
1answer
2k views

How to get the total km of route using Leaflet Routing Machine API?

I'm using machine leaflet route to draw routes I can get the total route miles? How can I do this? I know the class IRouteSummary, but I am unable to access it. Just wanted an example so that I can ...
3
votes
1answer
19 views

Handle Multiple Layer Max Zoom Levels in Leaflet

Along with Mapbox layers, we are also adding layers from WMS and ArcGIS servers hosted by our customers to display map data relevant to them. Is there any way to figure out what the max zoom for a ...
2
votes
0answers
91 views

Has anyone implemented the leaflet.shapefile plugin?

I'm trying to implement the leaflet.shapefile plugin to enable a user to upload a zipped shapefile and overlay it on my webmapping site as can be done in the demo version of the site. ...
5
votes
0answers
199 views

Any Examples of D3.brush() used with Leaflet?

I have a leaflet map that I have placed an SVG "on top of" using the leaflet overlay pane. I want to add a D3 brush to the overlay pane that will then update a separate chart. I've looked around for ...
4
votes
1answer
1k views

display a choropleth map using D3 and Leaflet

I am trying to get a leaflet map to display a choropleth map using d3. I have written this code using samples I have found however the map just displays as the black fill, not the color classes I ...
0
votes
0answers
35 views

Mapbox Geocoding Custom UI

I am building an interactive mapping web app and needed to bounce some ideas off of you all. I need some guidance on how I would go about bypassing Mapbox's addGeocoderControl and use a search box on ...
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 ...
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, ...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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
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 ...
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
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. ...
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 ...
0
votes
0answers
74 views

Accessing GeoServer 2.8.0 on Debian 8 using Tomcat 8?

Not been able to access my Geoserver with Javascript. The Leaflet code running natively works in other javascript/HTML pages which connect on-line GIS servers. Added ENABLE_JSONP true to web.xml ...
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 <- ...
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 ...
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": [ [ ...
1
vote
1answer
65 views

Qgis2Web wfs data doesn't show

Hi i've eneabled the plugin qgis2web. after getting one WFS-layer in de QGIS I started the gis2web plugin. Because it is a wfs-layer and i want leaflet to use that wfs i don't check the Encode to JSON ...
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
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
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 ...