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

learn more… | top users | synonyms (1)

2
votes
1answer
143 views

JSONP working with Leaflet time slider

I would like to integrate the time slider into a JSONP geoserver. Here is the current code I have http://jsfiddle.net/qcwcrwge/26/ and I would like to use the time slider with a layer called ...
0
votes
1answer
44 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 ...
3
votes
1answer
304 views

leaflet geojson contextmenu

I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu). I've managed ...
0
votes
0answers
12 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
1answer
180 views

Leaflet Draw - add title to marker or shape?

I am trying to create a participatory mapping site where users can draw pts, lines and polys using Leaflet draw. Is it possible to create a pop window where users can add a title or description of ...
0
votes
0answers
106 views

How do I determine programmatically what values to add to the proj4js constructor for a CRS or SRS such that I can iteratively render proper overlays

I think this is primarily a GIS based question as far as for example: var crs = L.CRS.proj4js('EPSG:2154', '+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 ...
5
votes
1answer
170 views

Moving a shape around the earth while maintaining the proper projection

What is the transformation needed to be taken on every data point of a shape to rotate that shape around the globe. I'm trying to figure out the math behind this kind of transformation so I can ...
1
vote
0answers
15 views

Leaflet update getcenter coordinates

I am bringing in leaflet routing control into my map and I would like to have the route icons show up in the center of the current view. using the code below I can get the icons to show up at the ...
2
votes
1answer
36 views

Leaflet Marker Mouseover Popup

I've tried to make a MouseOver Markers Popup since a couple of days, I'm using Leaflet. I know some solutions I've read in many forums, but I wanna make it work with GeoJSON-Points and I haven't found ...
1
vote
1answer
211 views

Leaflet WMS GetFeatureInfo gives result only on zoom level 10

I am using GetFeatureInfo with wms layer to get the data behind. The request returns data only after zoom level 10 before that it returns empty features. Does anyone having same issue? I think it ...
0
votes
1answer
122 views

Zoom variable or pixel distance

I have query by distance working in a framework that generates a list of features within a fixed distance of a clicked feature. I would like to make the queried distance variable based on either: ...
1
vote
2answers
36 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 ...
1
vote
3answers
46 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? ...
0
votes
1answer
27 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
26 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
30 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 ...
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
14 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
90 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
607 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
323 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
22 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
29 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
123 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 ...
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
118 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
97 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
34 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
27 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
36 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
26 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
31 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
19 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
169 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
61 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
223 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
261 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
100 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
64 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
38 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
50 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
393 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
37 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
25 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
44 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 ...
0
votes
1answer
169 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?