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

learn more… | top users | synonyms (1)

0
votes
1answer
23 views

Overlay layer not displayed above Base layer for custom panels of Leaflet.groupedlayercontrol plugin

I created simple web map (example http://jsfiddle.net/q77wk17z/1/) with one Overlay and several Base layers using Leaflet.groupedlayercontrol plugin. Overlay and Base layers divide on separate layer ...
0
votes
1answer
22 views

Compare several Overlay Layers with Base Layer in Leaflet

I write web app for comparing several Overlay Layers (in example OSM tile layers) with Base Layer (in example Bing Aerial layer) in Leaflet. It's work in 'first loaded' level zoom. But when I ...
0
votes
1answer
25 views

Adding comments using leaflet draw

I am working on an application that will leverage the leaflet draw plugin so that a user can open my map and drop comments in the form of markers. Then the user can click submit and it will serve me ...
0
votes
1answer
19 views

How to load geojson vector tiles from mapbox id?

I have some data hosted on mapbox and I'm trying to load it as tiled geojson into Leaflet from its mapbox id (I just want to get plain geojson, I'm not trying to render it). How can I achieved that? ...
1
vote
2answers
2k views

How I can load tileLayer in Leaflet framework using local tiles?

I'm using file:///C:/path/tiles/{z}/{x}/{y}.png like url of tileLayer but it doesn't work and no error is shown. var layer = new L.tileLayer("file:///C:/OSM/tiles/{z}/{x}/{y}.png", { minZoom: ...
0
votes
1answer
11 views

Positioning leaflet divIcon when adjusting size using css

I am using the L.divIcon when using iconSize:null which is causing iconAnchor:[0,0] to not be recognized,my code looks like this: var divIcon =L.divIcon({ className:'current-location-icon', ...
0
votes
1answer
69 views

Change marker's size by with zoom in Leaflet

I get stuck with changing my marker's size when zoom changes in my Leaflet code. It's a simple map with a metro stations overlay coming from an ArcGIS Server. The markers are coming from that same ...
5
votes
2answers
597 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 ...
2
votes
1answer
316 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
2
votes
1answer
17 views

Control to select data source on Leaflet map

I am building a map using leaflet. My data source looks something like this: var districts = {"type": "FeatureCollection", "features": [ {"type":"Feature", "geometry": ...
2
votes
0answers
25 views

Batch create leaflet webmaps in QGIS

During a project on the spider fauna of Greece, we have to face the design of distribution maps of the species. A good tool to work with is the design of leaflet webmaps to be used on the website ...
1
vote
1answer
121 views

Leaflet and census block data: not displaying

I am new to leaflet and am trying to load a geojson file showing census blocks and associated information for a city in CA. It is a small city and not too many census blocks. I cannot get the popup ...
0
votes
1answer
34 views

How to create and serve map tiles?

I have shapefile which is too large to be served as vector. Also, I need it only as background tile, not as layer with attributes. I thought of creating tiles in MapTiler as I already bought it. I ...
13
votes
7answers
1k views

Comparing two maps with nice web interface?

Is it possible in Leaflet or OpenLayers to compare two maps with a bar to slide between the two? Examples include: ...
2
votes
2answers
1k views

UTM Grid as a Layer with Leaflet

How can I display a UTM Grid as a layer with Leaflet? Search a way to embed a OpenStreetMap map with Leaflet in a website. Particularity. I want to display a UTM Grid as a Layer. In addition, lower ...
0
votes
1answer
116 views

How to query postgres with gis to get GeoJSON for GeoJSON tile layer?

I have a postgres database with one table like the following: CREATE TABLE post_pl ( gid serial NOT NULL, zip character varying(5), zip_n integer, city character varying(50), geom ...
0
votes
1answer
93 views

CartoDB.js SQL API editing geometry

Is there anyway you can allow users to edit the geometry of shapes (e.g. move an existing point) using the CartoDB.js or CartDB SQL API libraries. I realise you can do this directly in the CartoDB ...
0
votes
3answers
31 views

Get basic image/utf grid tile URLs from CartoDB visualization?

I'd like to add the layers from a CartoDB visualization to a Leaflet map directly (NOT through CartoDB.js). My visualization has one image tile layer generated from data, and one utf grid tile layer ...
0
votes
1answer
21 views

Adding drop-down menu on leaflet map instead of L.control

I have created a choropleth map including several layers from the same geojson layer which is turkeyData in my case.I actually did it and it works fine. But I like to change the standart leaflet ...
1
vote
1answer
34 views

CartoDB SQL and returning values

Right I've got this JS function function AreaCompare(sql, UIDfield, Geogname, Table, sourceName, sourceID, destName, destID){ CompareObj = {}; CompareObj.sName = sourceName; ...
2
votes
1answer
22 views

Hide/Show route layer in Leaflet when click on button (Easy Button plugin)

I have a Leaflet map with button (Easy Button plugin https://github.com/CliffCloud/Leaflet.EasyButton). When click on button on map added route layer (plugin ...
1
vote
1answer
27 views

Add svg filter to paths created by leaflet?

If I were to create a simple inline svg, I could modify paths to have a drop shadow or a blur by creating a <filter> within a <defs> grouping. However, Leaflet dynamically generates the ...
1
vote
0answers
16 views

Is the data supplied to Google Maps or leaflet.js javascript rest API is private

I have a dataset which has to be used for internal/intranet web application. Is the data supplied to google map javascript api to draw map as well as to show meta information through markers is ...
1
vote
2answers
163 views

Leaflet HTTP.Get bad request; not loading tiles

I am trying to walk through the Leaflet quick start tutorial and am having a really simple issue: None of my tiles are loading. I get this error at the image url and an HTTP Bad Request in the ...
0
votes
1answer
56 views

Adding a search box to a Leaflet.js example

Consider the example in the following link for Folium: US Employment visualization per county. The result looks like what you see below:     I would like to add a search box to it to be ...
1
vote
1answer
220 views

How to add multiple cartodb layers in viz.json to a leaflet layer control

I have create a visualisation in cartodb with 4 layers. The resulting viz.json is added to a leaflet map as follows: cartodb.createLayer(cartomap, [url], {https:true}) ...
1
vote
2answers
258 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
1
vote
1answer
97 views

Can't project ArcGIS Tiled Service for Esri-Leaflet

I'm following this example from the esri-leaflet docs. I have an ArcGIS Tiled MapService in ESRI:102696. So I'm trying to use Proj4Leaflet to project the service and use it in my application. I ...
0
votes
1answer
28 views

Changing cartodb.createLayer source

I'm applying a Carto named map layer to an existing Leaflet map similar to: cartodb.createLayer(map,{ type: 'namedmap', user_name: **username**, options: { ...
1
vote
1answer
57 views

How to add Geoserver WFS to Leaflet JS Application

I have a PostGIS database and have successfully consumed a table into GeoServer and published a WFS. Are there REST endpoints available for these WFS' akin to ESRI's feature services? How are ...
1
vote
1answer
36 views

The ordering of layers with CartoDB/Leaflet

Just want to get a bit of clarity about this query from before: Layer order in CartoDB I have a map with a Basemap and I want to draw points between features based on layer featureclicks, The good ...
1
vote
0answers
40 views

Load Maperitive's tiles.json into HTML for getting bounding parameters

I've created a local tileset of a city in Maperitive, and a basic leaflet.js webpage to browse it offline. There's a tiles.json also created by Maperitives that has all the essential bounding and zoom ...
4
votes
4answers
138 views

Sites that demo freely available Basemaps?

I've seen such sites in the past. I remember seeing one put together by Wm Lerer at a conference a couple years ago. What I'm looking for is a map that demonstrates all (well, at least a lot) of the ...
1
vote
2answers
392 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
0
votes
1answer
34 views

How to switch base layer programmatically in MapBox/Leaflet

I have multiple base layers, and need to switch them programmatically, dependent on various actions and states in my app. Can't find how, for the life of me. thanks!
0
votes
0answers
24 views

White tiles Leaflet

When i run the function below, i get white tiles in browser:(Leaflet) function areas() { var nexrad = L.tileLayer.wms('http://localhost:8080/geoserver/pgrouting/wms', { layers: ...
0
votes
1answer
42 views

Leaflet: performant handling of POIs all over the world

When you have a leaflet.js application, such as my experimental toy for xkcd GeoHashing (look at geohashing.cgi plus mirkarte.js), you have to draw points all over the world. In the GeoHashing case, ...
1
vote
1answer
49 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
1
vote
1answer
29 views

Most efficient method to get national-level data displayed with Leaflet

I'm looking for the most efficient way to get a national or U.S. and Canada level dataset working with a JS mapping library. My problem is there's a myriad of technologies that seem like they can ...
0
votes
1answer
164 views

Leaflet 1.0 release

I was listening Future of Leaflet talk: http://www.confreaks.com/videos/4665-jsgeo2014-future-of-leaflet and I'm really looking forward for 1.0 release. Are there any news on estimated release date?
3
votes
2answers
992 views

Leaflet WMTS layer

I would like to start using Leaflet instead of OpenLayers, but I can't find a way to load WMTS layer into the map. Is that possible with Leaflet, or do I have to stick with OL? I haven't found ...
0
votes
1answer
353 views

Leaflet geoserver wms doesn't show on google map base layer

I have a site running Openlayers (base layer google and overlay wms in epsg4326 from geoserver). The site works fine. I've decided to try doing the same with leaflet , and from some reason I can't ...
0
votes
0answers
12 views

Any way to make leaflet.draw polyline finite (i.e. max) distance?

Does anyone have an idea of how I could force a maximum distance when creating a polyline with leaflet.draw? In other words, I would like for the user to only be able to draw a line UP TO 1000 miles. ...
0
votes
0answers
26 views

Leaflet marker coordinates to GeoServer

I'm trying to display a Circle using GeoServer+Leaflet(HTML).I am using an address search tool which displays a marker. I would like to use the marker coordinates as center of the circle with leaflet. ...
2
votes
1answer
356 views

Leaflet setView with non lat/long CRS

Is it possible to use setView when using an alternative CRS? var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method ...
0
votes
0answers
26 views

Loading minimap in Leaflet

I use this for loading google basemaps https://gist.github.com/crofty/2197042#file-leaflet-google-js , this to switch basemaps https://github.com/ismyrnow/Leaflet.groupedlayercontrol and this as ...
0
votes
1answer
638 views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
1
vote
1answer
32 views

How to add GeoJSON layer with GraphHopper?

I have a GeoJSON file containing some POI that I would like to be able to display within a separate layer with GraphHopper. But after several tries and search over internet, i can't manage to get a ...
2
votes
2answers
584 views

Viewing map tiles from Maperitive in leaflet or openlayers

I generated tiles in Maperative. Created following html file: <html> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="leaflet/leaflet.css" /> ...
2
votes
1answer
33 views

d3 + Leaflet apply class value from geojson data

I have a geojson file that I'l able to draw just fine with D3 + Leaflet. I'm having trouble applying a class to the svg objects with a value from the geojson file. Each feature in the geojson file has ...