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

learn more… | top users | synonyms (1)

0
votes
1answer
40 views

Custom Leaflet Legend

Trying to create 9 separate leaflet legend variables for the 9 different overlays (graduated colour chloropleths) I have on a leaflet map. Each overlay will have 6 classifications of colour dependant ...
1
vote
1answer
38 views

Why is the highlighting on these features obscured?

I have a function that highlights features when the user enters search text, and that text is found in the attributes of the given features. The code basically works; the problem is in the display. ...
1
vote
1answer
33 views

Toggling Leaflet Legends

Currently trying to use the following code to add and remove Legends as a result of an overlay being added to the map. Getting no error messages in browser but still doesn't seem to be working. ...
1
vote
1answer
49 views

Highlighting a specific country on a world map

I am using leaflet to display a list of country names in a side panel. I am also showing them highlighted on a world map. When I click on a name in the side panel, I want to change the color of the ...
1
vote
1answer
200 views

How do I toggle a legend of a cartodb layer in a leaflet map?

Per my previous question - here - how do I get the legend to toggle (I have it turned off now) in conjunction with toggling the cartodb layer via the leaflet layer control? Maybe adding it as a ...
4
votes
1answer
54 views

Remove sliver gaps between polygons with R

Is there a way to eliminate the small "slivers" between polygons using R? The desired solution would create a new SpatialPolygonsDataFrame where the shared boundaries between polygons are coincident. ...
1
vote
1answer
223 views

Created custom tiles, added tile bounds to leaflet but it's still trying to load tiles outside of boundaries

I created custom tiles in TileMill with latitude/longitude boundaries of: -89.8235,43.3377,-89.5952,43.4741 I added those tiles into the map and set the tile layer's bounds attribute, but Leaflet ...
0
votes
2answers
85 views

Adding one search box for multiple GeoJSON polygon layers?

Multiple GeoJSON markers can be combined to one group layer then search on a specific attribute but doesn't work for GeoJSON polygons. How to put multiple GeoJSON markers and polygons in one search ...
0
votes
0answers
24 views

Which library map better for my use [duplicate]

I will be start by saying that for couple of weeks i have been looking for a good map library that will serve my desires well,so i started to find the "best" one. First of all my main desire is to ...
0
votes
1answer
34 views

Display tiles from a custom GeoTiFF overlayed on googles satellite map using leaflet

I want to overlay tiles generated from a GeoTIFF raster I created on a google satellite map. What I have tried is: Style and output a high quality colored PNG using qgis's map composer Tile this PNG ...
2
votes
1answer
308 views

How to calculate the bounding box of a geojson object using python or javascript?

I have django app with leaflet on the frontend and I need to calculate the bbox of my geojson so that I can pass the coordinates to map.fitBounds() I have tried some libs as well as trying the ...
0
votes
1answer
344 views

Creating Leaflet layer that can be toggled in layer control from CartoDB viz.json?

How do I create a leaflet layer that can be toggled in the layer control from a cartodb viz.json? I have read that the cartodb.createlayer does not create a leaflet layer. It seems you can add the ...
1
vote
2answers
133 views

Applying a single leaflet search control to search multiple layers?

I am attempting to add a single search button to look through geoJSON layers. They will look through the field "name". Unfortunately, my method of creating a layer group is not working. What am I ...
0
votes
1answer
32 views

Leaflet - get bounds of all layers, not just vector

I need to get the bounds of all layers in a Leaflet map, not just vector layers. For vectors, I add them to a L.featureGroup, which has the method getBounds(). How do I include raster layers as well?
8
votes
2answers
3k views

Leaflet mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the ...
0
votes
1answer
35 views

Leaflet markercluster plugin also showing unclustered points

The following code displays clusters correctly. However, it also displays all the points as well as the clusters, which I don't want. What have I done wrong? Apologies that I cannot simplify the ...
5
votes
2answers
1k views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
0
votes
1answer
79 views

Leaflet force use GPU

Im using leaflet to draw points defined by custom div(like the default css in the leaflet.css). I have to update the points every 30 mili secs. But it seems to be so slow.. when i reach to high ...
1
vote
1answer
42 views

Making leaflet handle tiles that have nodata values transparent?

I have a tif that I cut out the two sections of and merged them together into one tif and then processed it. Shown below is the original and the processed cuts (not to scale). Between the two ...
5
votes
0answers
86 views

How to display wind data in R with the leaflet package

I have some data like this : longitude latitude speed direction 1 6.10722222 46.23639 4 360 2 6.95416667 43.54694 4 360 3 7.21472222 43.66556 ...
1
vote
2answers
147 views

Invalid GeoJSON object

I'm working with Leaflet trying to get some GeoJSON going. Everything works fine when I directly define a var as the GeoJSON I'm trying to display: var censustracts = { "type": ...
1
vote
0answers
56 views

Automatically filling contours by different type of hatching?

I applied a question a few days ago here Filling contour levels with grain (texture) using Leaflet, I still found no answer I try to well exposed the problem here again in another way. if we have a ...
0
votes
0answers
31 views

Mapbox - Images as Maps

In the past, by following this tutorial by Tom MacWright, I was able to in a few steps display any jpeg images as an interactive map with Mapbox. The steps are summarized below: Run a python script ...
0
votes
1answer
43 views

On lower zoom polygons don't show

I'm working with Leaflet and nodejs and when a polygon layer is loaded when the map view is at world map, the polygon don't shows, I have to zoom in at approximately zoom 10 or 13 to show polygons. I ...
1
vote
1answer
183 views

Filling contour levels with grain (texture) using Leaflet

I created a program to draw temperature contour map of France: This is the code: library(ggplot2) library(gstat) library(sp) library(maptools) require(rgeos) library(rgdal) library(foreign) ...
1
vote
0answers
13 views

Conflict standart leaflet polygon and polilyne vs leaflet-dvf plugin

I found some bug: if you are using leaflet-dvf plugin and want to draw standart leaflet polygon, you will get error in your browser's console like Uncought RangeError: Maximum call stack size ...
9
votes
5answers
1k views

How to use Leaflet to efficiently show parts of a massive dataset?

I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is. There is some dataset of thousands of items. We want to show a map to the user, with the ...
3
votes
2answers
60 views

Move leaflet polygon to given position

I have a circle and a polygon that I'd like to move to the user's local position. I managed to move the circle latLng but I can't find a way to do the same thing with a polygon. Can someone help me ...
1
vote
2answers
157 views

Fly To Location in Leaflet

Is it possible to 'fly to location' in Leaflet in the same way as this Mapbox GL example?
0
votes
1answer
194 views

iterate over cluster in markerCluster : leaflet

i need to iterate over all clusters that are currently present in markercluster using leaflet. there's a method called markercluster.getClusters() in googlemaps to do this job. is there something ...
4
votes
2answers
43 views

How to hide leaflet base map?

I'm building a webGIS using leaflet library. Since the data visualization is for only a certain region, it seems that the broader leaflet base map looks a bit distracting. I wonder if there's a way to ...
0
votes
4answers
76 views

How to add remote GeoJSON data to a Leaflet map as a new layer?

I seem to be having a problem parsing the GeoJson and adding the layer to a Leaflet map. var terrain = ...
1
vote
0answers
23 views

WebMapping Charts Overlap Issue LeafletJS

I am a beginner in webmapping development using LeafletJS and JS. I am the owner of the website built under LeafletJS. I have faced some problems with charts overlapping. On the right top of the map ...
0
votes
0answers
46 views

leaflet+canvg= leaflet svg elements on canvas

I want to create png file from leaflet map. I use html2canvas library, and leaflet map tiles and other elements convert to png great, but not svg-elements(offsets). I know, that there is some code to ...
0
votes
0answers
62 views

Add and remove several layers to map leaflet

I 'm trying to add objects to a map I get from an asynchronous call, what I have: var objetosLayer; var overlays = {}; $scope.showItems = function (content) { var showItems = function (item, ...
1
vote
2answers
62 views

Tiles with Leaflet from Qgis

I tried QTILES plugin for QGIS and it works very well. I can export tiles in .mbtiles or zip format. Now I'm trying to know how call these tiles from leaflet in this way: ...
1
vote
1answer
73 views

Transform an image with projection EPSG:4326 to EPSG:3857

I have an image with known boundary and projection EPSG:4326 and want to overlay it to openstreetmap using Leaflet.js. I have tried using function imageoverlay, but the image is not aligned with the ...
0
votes
0answers
41 views

Problem displaying 2 WFS layers in Leaflet

I have a problem displaying two WFS layers from Geoserver with Leaflet. Most of the time it works well, but sometimes, when I click on my first layer, it returns the second, and sometimes, if I click ...
0
votes
0answers
15 views

Leaflet composite control

Looking at Google maps bottom right bar I was wondering if there is a method to compose leaflet controls to obtain a similar effect (i.e. Attribution, links and scale) by composing existing controls. ...
4
votes
1answer
1k views

leaflet - Drawing line following the road

Short version: What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road. Long Version: I have several houses that I wish to mark ...
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
72 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
43 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
34 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
23 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
27 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
138 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
87 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 = ...