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

learn more… | top users | synonyms

1
vote
1answer
214 views

Leaflet Legend fixed image? not SLD?

I have a style pulled from my GeoServer and have created a basic legend, with a fixed PNG. However I was wondering if it is possible to have this legend be pulled from the layers SLD? so that if the ...
1
vote
1answer
89 views

Is there a Cluster convex hull implementation in OpenLayers?

In this leaflet example. When hovered over a cluster marker, it shows the bounding area of the clustered features which is known as convex hull. Is there a way to reproduce it with OpenLayers?
1
vote
1answer
683 views

Request WFS from GeoServer with Jquery AJAX using INTERSECT cql_filter error

I am having difficulty troubleshooting this issue and would appreciate some ideas. Thanks in advance! I am trying to make an AJAX request from a Leaflet map with Jquery to GeoServer to return a WFS ...
1
vote
1answer
324 views

Leaflet export to jpg

Does anybody know if there is a way to export the current view of a Leaflet map to jpg? The setup is as follows: Leaflet is hooked up to an Oracle database. Depending on user interaction, various ...
1
vote
1answer
301 views

GeoJSON is valid according to JSONLint but jquery gives error

I have the following GeoJSON (from webservice) { "Features": [ { "Id": "1", "Geometry": { "Coordinates": [ { "Latitude": 31.2812, ...
1
vote
1answer
551 views

GeoJSON in Leaflet

I'm just starting to work with leaflet and have a basic question about showing a geoJSON file. First, I found this excellent article with example code: http://bl.ocks.org/lxbarth/4019660 However I ...
1
vote
1answer
218 views

Get latest tiles from TileMill's tile server in Leaflet

My leaflet app gets the tiles from TileMill's tile server in the standard way: L.tileLayer('http://<myip>/tile/SteveCountryVic/{z}/{x}/{y}.png', { ... }); These tiles are often old, not ...
1
vote
1answer
129 views

How can I make a leaflet control open by default?

I'm using leaflet to display a map. I have a control section that I'd like to be open by default, but I can't find a way to do it through the API. Is there a way to do this?
1
vote
2answers
131 views

Where to store geodata to be layered over an OSM tile map?

I'm working on a project for which most data can come straight from OSM. But some data is not relevant to OSM and will need to be stored separately then layered over the top. Probably the tiles will ...
1
vote
1answer
352 views

Leaflet Marker Cluster: Popups won't open after first

I built a map using Leaflet and markercluster.js, and I'm having a strange issue where after I click on the first popup, I'm unable to open any other popup. This happens whether you close the first ...
1
vote
1answer
230 views

Looking for a GeoJSON describing the french departments

Is there any place where I could find a GeoJson describing the borders of the french departments, or do I have to convert a .shp file?
1
vote
1answer
3k views

Custom Leaflet Controls

I have gotton some help in creating a custom control for leaflet, but I am still having trouble upgrading to the CSS styles used by the latest versions of Leaflet. Basically, all I need is a icon in ...
1
vote
1answer
505 views

What is the best way to use Leaflet and Geoserver to highligh a feature after a WMS request?

I have a web map, and I'm hoping to make it interactive. The layer I have is reasonably large, at 15 mb in GeoJSON format 4 mb compressed, so I don't want to load the whole layer as one file. But, I ...
1
vote
1answer
519 views

leaflet layerGroup is rendered behind baselayer

I have several baselayers and overlays. Everything is fine except the lauerGroup is rendered behind the baselayer. First I define the baselayers and add them to a 'baselayer' variable. // base ...
1
vote
2answers
195 views

converted SHP to geoJSON - how to put this on OSM map?

I'm a beginner at this. I converted a shapefile to a .js file but I am having trouble adding this data to a map using leaflet. The osmscarb.js: var osmscarb = { "type": "FeatureCollection", ...
1
vote
1answer
370 views

Is it possible to show migration arrows on Leaflet map?

I need to develop Leaflet map which will show the whole world. Also, I need to draw some arrows which will show paths of migrations in the world. The important thing to say that those arrows need to ...
1
vote
1answer
1k views

How to plot multiple markers on a leaflet map?

If I have a object containing lats and longs how can i plot them in leaflet using the marker constructor I tried looping through them for(key in obj){ var val = obj[key]; ...
1
vote
1answer
82 views

Change default leaflet marker color

I'm using esri-leaflet, and leaflet inherently to add a point feature class (geojson) to a map. What is the best way to add and style the layer? I've see pointToLayer on the leafletjs.com, but don't ...
1
vote
1answer
36 views

Get bounding box of WMS

Is it possible to request the bounding box of a WMS from GeoServer? In my case I have a WMS that I show with L.TileLayer.WMS in a Leaflet map. I like to center and zoom my map to the WMS.
1
vote
1answer
120 views

Which plugin can draw topoJson right within Leaflet without conversion?

I already have asked how to reduce file size and increase performance for publishing spatial data on the web using Leaflet, here. A conversion to TopoJSON has reduced the file size by approximately ...
1
vote
1answer
133 views

Leaflet JS calling animatedMarker.stop() from event listener

I'm using the animated marker plug-in for Leaflet JS and would like to stop the marker from animating when it reaches a certain lat lon position. Currently I'm using Leaflet's 'move' event listener ...
1
vote
2answers
155 views

Is there a good free Flat style map tile available?

I'm building a website in the style of Flat Design, and hoping to find a map tile that complements the design and can be used with Leafletjs.
1
vote
1answer
122 views

SVG control not visible on top of Leaflet.js

I'm using Leaflet 0.7.1 and want to draw a radial menu (like openstreetmap's iD editor) on top using d3. Some examples I found use Leaflet's overlayPane to append the svg element to: var ...
1
vote
1answer
407 views

Using Google Tiles on LeaftLet

I would like to use the Google tiles on LeafLet (RoadMap, Satellite,...). I've tried this https://github.com/shramov/leaflet-plugins and it works fine, but I'm worried about the possible legal ...
1
vote
1answer
120 views

projection error on Leaflet map

I am trying to add a converted shapefile (now a geojson) to a Leaflet basemap, using EPSG 26986, so I tried using proj4leaflet to reproject it. However, I keep getting an error message "phi2z has ...
1
vote
2answers
1k views

Leaflet with EPSG4326 Tile Layer (using maptiler.org)

I have successfully been using Klokan Petr Pridal's MapTiler (http://maptiler.org ) to take GeoTiff files and create TMS tile pyramids for Leaflet (option #1 which projects to EPSG3857, also called ...
1
vote
3answers
758 views

Add TileCache Schema Layer to Leaflet Map

I am trying to get Leaflet to display a TileCache Schema tileset. One example: http://example.com/tiles/Admin/06/000/000/357/000/000/158.png As far as I can tell, Leaflet only supports TMS style ...
1
vote
1answer
481 views

Slow tiles generation for leaflet js

I am currently trying to use leaflet to display images (jpeg or png) instead of maps, I have followed the instructions on this blog post to create the tiles using gdal2tiles.py here is the code we ...
1
vote
1answer
269 views

Is it possible to use Leaflet, PostGIS and PGRouting for web mapping?

I am newbie at Open Source GIS. I have already create a web mapping using custom tiles and leaflet. I have used my my own database. Tilemill was used to create the tiles and leaflet was used to ...
1
vote
1answer
833 views

How to deal Leaflet map control checkboxes?

I add some geojson layers to the map control once a layer is loaded and the control can show all the layer names. But I notice that all the checkboxes are unchecked by default. So that once I click ...
1
vote
1answer
606 views

Does leaflet support wms tile layers in applications/openlayers formats?

I am trying to create a tilelayer.wms overlay on top of a wfs base map and I wasn't sure whether leaflet allows the applications/openlayers type of format which I served up from geoserver or only ...
1
vote
1answer
235 views

Does Leaflet always work in decimal degrees?

I'm looking into Leaflet and I'm surprised that it doesn't (seem to) specify coordinates in Web Mercator like other popular APIs, but instead uses decimal degrees. Are all coordinates in Leaflet ...
1
vote
1answer
131 views

Pick object by properties (and centre on it)

I have a Leaflet map with a Cloudmade base layer and a single layer of polygons. Each of these polygons has a reference number attached as a property. I would like to select a reference number from a ...
1
vote
0answers
36 views

Leaflet add and remove legends with layer selection

I'm new to Leaflet/Javascript and have been struggling to get legends a map to show only when a specific layer is selected from the layer control. I have three layers, one of which I would like to ...
1
vote
0answers
8 views

Opacity contrl for mapbox map with several layers

This is an example of how opacity can be changed for a Mapbox.JS map: https://www.mapbox.com/mapbox.js/example/v1.0.0/opacity/ The example shows only one layer used. With barely any experience in ...
1
vote
0answers
28 views

Leaflet marker cluster by Administrative boundary

Is it possible to perform clustering based on administrative boundary using the leaflet.markercluster plugin? How would I do that? I already have the boundary layer.
1
vote
0answers
20 views

Leaflet snap circle draw to marker

I am looking for ideas/libraries that enable snapping when I create a circle with leaflet draw. There is the libaray Leaflet snap, that enables snapping of draggable markers to polylines and other ...
1
vote
1answer
32 views

Query data without opening up database?

I have a bunch of polygon data that I want users to be able to sort/filter based on certain criteria. I have the data in a CartoDB table, and can pretty easily use some SQL calls to achieve what I ...
1
vote
0answers
31 views

Refresh leaflet marker data in place ? (on insert to sql db)

I have a form that sends data via ajax to be geocoded and inserted into a mysql db. Once that data is there, can I force the marker layer to refresh so that it displays the new data? The SQL API ...
1
vote
0answers
22 views

Leaflet toGeoJSON() keep leaflet_id

When I use the function .toGeoJSON(); is there way to keep the layer leaflet_id?
1
vote
0answers
59 views

four color theorem for QGIS 2.0 or Leaflet?

I recently looked at some other posts relating to this topic but as far as I can tell there is currently not a working plugin or script for QGIS 2.0 to achieve a four color theorem for styling polygon ...
1
vote
0answers
112 views

OpenLayers3 vs Leaflet for styling multifeature geojson

I'm experimenting with various options for displaying geographic information to the public in html format. The ultimate aim is to build an online application where anyone can add the route they cycle ...
1
vote
1answer
135 views

how does one reset map.fitbounds (zoomtofeature()) to the original zoom?

I have a lovely map setup using Leaflet with MapBox tiles (only). It is a United States map with polygons for each state with an onclick event to zoomToFeature. The basic zoomToFeature() function ...
1
vote
0answers
78 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 ...
1
vote
2answers
55 views

Start-Marker from geojson polyline

i have a map with some walking- and bike-routes and popups with a few details and a picture. Now i want to set a marker on the first vertex of a geojson polyline, but i cant find out how. Btw. i´m ...
1
vote
0answers
14 views

GeoServer Date ftl showing time stamp rather than just the date

I had an issue with Geoserver showing my postgresql data in the US (MDY) format rather than the UK / European format (DMY). I fixed this by removing the comment #, and setting the language, to en_GB. ...
1
vote
1answer
103 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 ...
1
vote
0answers
72 views

leaflet choropleth map using dynamic value

I am doing a choropleth map using leaflet and JSON data. I got a clean tutorial in leaflet site. In that tutorial the used us-states.js JSON file where the choropleth was based on the ...
1
vote
2answers
192 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: ...
1
vote
1answer
52 views

Is there a way to visualize TIN surfaces for web-mapping purposes?

I have created a TIN data set of electricity consumption. It is visually appealing, and often times TINS help the map reader understand geographical relationships better. Are there methods to ...