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

learn more… | top users | synonyms (1)

5
votes
0answers
167 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 ...
5
votes
0answers
269 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
0answers
37 views

Is it possible to use a raster::click event within an interactive leaflet map?

Data Download: https://www.dropbox.com/s/f849ra8l6umo9d8/crops.tif?dl=0 I have various raster images of the world that I would ultimately like to plot within an interactive leaflet map; an example is ...
4
votes
0answers
70 views

Thematic map exported using QGIS2Web is extremely laggy

I have made a world thematic map and added layers of data for creating graduated color scheme on the country level. I need a interactive map as an output which shows values when user hover over any ...
4
votes
0answers
130 views

Display GeoJSON data on map using django-leaflet?

I want to display GeoJSON data on map in geodjango. When I use the below code only GeoJSON data like: { "type": "FeatureCollection", "features": [{ "type": "Feature", ...
3
votes
0answers
70 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; ...
3
votes
0answers
185 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 ...
3
votes
0answers
132 views

What is the openlayer.js alternative of unloadinvisibletiles of leaflet.js

I am using open layers with a tile server. I want to load maps while panning and destroy the loaded region when out of screen (Alternative to unloadinvisibletiles of leaflet.js) How am i suppose to ...
3
votes
0answers
257 views

Adding an offset to a Leaflet TileLayer on the fly

I'm currently using Leaflet to display 18th century maps of Belgium as a base layer with a vector overlay of the present day road system. Although the maps are absolutely gorgeous ...
3
votes
0answers
354 views

Displaying a box with text on a leaflet map

Is there a way to display a label or textbox on a specific geo-place on a map produced by leaflet.js.? I know about the Marker- and Polygon Method But I can't find a way to put text in the polygon. I ...
3
votes
0answers
221 views

Leaflet Marker Dragend Bug/Difficulty

I am having a problem with leaflet markers. The problem is that when I drag a marker with a lower z-index under another marker with a higher z-index and let it go, it makes another marker. I have a ...
3
votes
0answers
1k views

How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in place in the leaflet-overlay-pane? (For example, how could ...
3
votes
0answers
611 views

Leaflet Event Craziness: jQuery click events don't propagate to L.DomEvents

I noticed that calling .click() on jQuery selected DOM elements in Leaflet ( such as anchor icons ) will not do anything -- the click event isn't propagated to the events created with L.DomEvents. For ...
3
votes
0answers
736 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 ...
3
votes
0answers
340 views

How do I format tilelayer.wms url properties such that I add an overlay iteratively to my base map in leaflet

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so: url: ...
3
votes
0answers
2k views

How to serve OpenStreetMap Tiles locally using ArcGIS Server 10?

We want to serve OpenStreetMap Tiles locally using ArcGis Server 10 to use as base maps in our ESRI Silverlight and Flex GIS clients. We've downloaded our regions OSM file and created PNGs using ...
3
votes
0answers
475 views

How do I pass a LatLng Bounds from Leaflet to Mapfish Print?

I successfully fired up a MapFish print server on Elastic Beanstalk, and it prints out the sample spec files fine, but I'm trying to pass bounds from my Leaflet frontend now, and encountering a lot of ...
2
votes
0answers
31 views

Leaflet filter on geoJson properties : multiple criteria

I'm using Leaflet filter on geoJson data. I'm able to apply it with a simple criteria : filter: function(feature, layer) { return feature.properties.field1 == "yes"; } I want now to apply it ...
2
votes
0answers
40 views

Draw raster on top of a Leaflet map

I want to implement a raster layer on top of a Leaflet map that includes the following functionalities: Digital Elevation Model (DEM) terrain height included in each raster cell GPS-Track (I use ...
2
votes
0answers
19 views

Filter data from WFS request in Leaflet

In the past I have used OpenLayers in order to make WFS requests to geoserver and show features on a map. I have also used WFS rules in order to filter the data based on specific values. Now I am ...
2
votes
0answers
38 views

How to instantiate a new map with proj4leaflet projections from a Bootstrap dropdown menu

I'm currently working on a Leaflet website that will be able to display GPS-Tracks with different projections. Now I'm trying to implement a dropdown menu based on Bootstrap, where I can set different ...
2
votes
0answers
52 views

Alternative basemaps for leaflet

I am interested in creating a web map application, that will display a map of my country and various files (.tif, shp) on top of it as layers and i decided to build it on top of leaflet. So when i ...
2
votes
0answers
82 views

Map not rendering at zoom level 18+ using openlayers3 and leaflet

I've configured an OSM map server with mod_tile/renderd/postgres to display a basic map and everything works fine until I try to zoom into level 18 or more. At any zoom level less than 18, I can see ...
2
votes
0answers
64 views

R: Setting pop-ups dependent on zoom level using leaflet

I have data that I would like to group differently, depending on the zoom scale in an interactive map made using leaflet. I have expenditure data and I would like to show expenditure by lake at ...
2
votes
0answers
98 views

Mapbox GL Leaflet interaction

I've built a map in Leaflet which has a really large GeoJSON file. Currently the only way I can get it to work is if I severely simplify the GeoJSON file down from 100mb to 25mb. I'm looking at using ...
2
votes
0answers
53 views

Removing individual markers from map

I have a map with several moving markers on it and have been trying to remove each individual one when their respective animation ends. I am using Leaflet and Leaflet's plugin Leaflet.MovingMarker. I ...
2
votes
0answers
31 views

Need to show a popup on selecting a layer option in leafletjs

I am trying to show a set of options using the layerGroup functionality to filter out the markers. I need to show a popup when an option is selected from a layer which will prompt the user to enter a ...
2
votes
0answers
35 views

How to place image between two marker using css : leaflet

In my application where i use leaflet api, i am able to put two gate markers and polyline drawn between them. Here, i just wanted to find out the way to put the image from css on the polyline which ...
2
votes
0answers
133 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. ...
2
votes
0answers
88 views

Different Leaflet fillcolors for different layers

I have a leaflet map set up with two layers and I want them to use different colorization functions to color the choropleth shapes. My shapes are set up in layers like this: var povertyLayer = ...
2
votes
0answers
45 views

Click event returning wrong Y container point in Leaflet

I am using QGIS Server and Leaflet to display geotiffs on my website. I have created an onMapClick function which uses a GetFeatureInfo request to QGIS Server which returns the value of the geotiff in ...
2
votes
0answers
37 views

Can we set the latlng start point : leaflet

I am working with the leaflet api.... I was lately, trying to figure out how to change or set the latlng start point in leaflet map..... Currently i am working on use image as map,,,,the ...
2
votes
0answers
132 views

Cant' get the correct measurements : LeafLet

i am working with the simple app Beta Here The application is using leaflet plugins/api.... User draw a line(poly-line) on the map/image and then enter the distance between two points.... Working ...
2
votes
0answers
104 views

GTA V coordinates to LatLng

I'm here because I'm trying to create a GTA V map with Leafletjs API. In deed, I've got my tiles that are ready. But the aim is to put markers on the map by using GTA V in-game coordinates. To achieve ...
2
votes
0answers
268 views

Leaflet : Change marker icon from onEachFeature instead of pointToLayer

I'm referencing external data, matching it up with particular fields in feature.properties and using that to decide which layer to put the feature in, all of this from inside the onEachFeature part. ...
2
votes
0answers
253 views

Leaflet Maps Sync Problem (Resolved)

I am trying to sync 3 maps (BaseMapd, overlayMap, tiledMap) side by side however these maps don't sync together immediately but it works sometimes during different multiple browsers (Chrome, Firefox ...
2
votes
0answers
65 views

Leaflet: get the color of a specified pixel on the map

I need to get the color of a specified pixel on the map. How can I do it using the current API of Leaflet?
2
votes
0answers
284 views

Leaflet filtering existing featuregroup

I have a leftleat map and i would like to filter the featuregroup i am displaying. exp_colJSON = new L.geoJson(exp_col,{ onEachFeature: pop_col, pointToLayer: function (feature, latlng) { ...
2
votes
0answers
398 views

Loop through a marker cluster using Leafletjs

I have a variable like this var cubbon = new L.MarkerClusterGroup() then i added many markers to this variable. now i like to create a function() and loop through the variable and find out a marker ...
2
votes
0answers
323 views

Comparing mapping APIs

I am planning to write a thesis about mapping APIs and compare three of them (Google Maps API, Leaflet and OpenLayers) or four, if you consider OL2 and OL3 as different APIs. I am planning to make 3 ...
2
votes
0answers
61 views

What is the best way to handle metadata with TileStache?

When I'm serving up maps and UtfGrids with tileStache I would like to also include some metadata with the layers so that my leaflet application can understand the context of the layer. For example: ...
2
votes
0answers
133 views

Multiple Leaflet maps on website in different divs

I'm pretty new to leaflet.js and I'm trying to figure out how to assign the same map with the same set of options and layers to a different HTML container instead of having to remove and add a new one ...
2
votes
0answers
116 views

Stray horizontal lines after converting from GeoJSON to topojson

After converting a GeoJSON file to topojson, and loading the topojson into Leaflet, stray lines appear in the resulting map. Like this: What is causing this? If I view the GeoJSON, these stray ...
2
votes
0answers
193 views

What is wrong with my data receiving from php script for geoJSON TileLayer?

I want to get geo data as geojson for geojson tile layer requests in leaflet. I set up a geojson layer like this: https://github.com/glenrobertson/leaflet-tilelayer-geojson/ A php script answers ...
2
votes
0answers
69 views

Popups not showing on layer/feature/marker groups

I had two problems. One was that, once I got lots of markers in one layer, and lots of polylines in another, someof my markers, starting from the north, started to vanish. I noted in the doco that ...
2
votes
0answers
98 views

loading geojson in leaflet

I just added the geoJSON vector layer in leaflet for my hybrid mobile app using phonegap, the problem is that when I add the geoJSON file of size larger than 2mb the application crashes. What is the ...
2
votes
0answers
147 views

Adding marker on a leaflet map

I'm very new to GIS and for learning I started with building a simple web app with GeoDjango. I am using dango-leaflet. Since I have a very limited knowledge I am facing many challenges. I'm trying to ...
2
votes
0answers
109 views

How do I change polygon opacity using a esri WFS in leaflet?

Note...Solved and here for anyone having this problem...damn simple problem, I had not used a higher case character for fillcolor and fillopacity....they should be fillColor and fillOpacity , it ...
2
votes
0answers
493 views

Z-Index in GeoJSON features using leaflet

I have a watershed polygon with sub-watersheds contained within the larger watershed. I would like the sub-watersheds drawn on top. Can i control the drawing order of features within a geojson object ...
2
votes
0answers
310 views

Leaflet - Enable/Remove popup on mousedown/mouseup?

I'd like to do as the title suggests and can get the popup to appear on mousedown with the following code, but mouseup doesn't close the popup: // Quick look at info on mouse hold ...