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

learn more… | top users | synonyms (1)

3
votes
1answer
202 views

Put LeafletJS geoJSON's into a MySQL database through PHP

I'm doing a project that will let users manipulate a map through LeafletJS, creating circles and polygons on top of the map. I need to gather these inputs for later analysis, using a MySQL database ...
1
vote
1answer
116 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
1answer
903 views

Leaflet.js add/remove control from Map

I am attempting to combine two fine plugins Leaflet Easy Button and Leaflet Routing Machineand i can't quite get it to work. what I want seems simple enough, I would like to have a button that when ...
1
vote
1answer
255 views

Leaflet pop up fade out animation

When a popup is opened with Leaflet a nice fade in animation is played. When you close the popup however it abruptly disappears. Does anyone know how to play a fade out animation when closing the ...
1
vote
0answers
107 views

Leaflet CRS.Simple or CRS.EPSG3857 conversion Problem

I'm using v-leaflet (0.61) , a vaadin plugin, to visualize some layers over a map. Clicking on the map, I create a wms query to geoserver. The query needs some parameters and one of them is the bbox. ...
0
votes
2answers
548 views

create a draggable circle in leaflet

hey guys can u please tell me how to create a circle in leaflet which can be dragged across the map.I do not want to use Circlemarkers as i want to specify radius in meters and also the size of ...
2
votes
3answers
275 views

Prevent Leaflet from requesting non-existing custom tiles

I have created custom tiles using TileMill. extracted tiles as png images and adding them on base layer. using following code var venu_map = new L.tileLayer('static/b18/{z}/{x}/{y}.png', { ...
0
votes
1answer
20 views

Why is my Leaflet JS App Canvas moving around?

I have an Leaflet JS app, and when a user clicks on the canvas, the entire world is able to move causing the unsightly gray background to be shown. http://jsfiddle.net/nos5gbjh/
1
vote
1answer
191 views

Leaflet elevation profiles with multiple GeoJSON features

I have a map which loads a GeoJSON containing two features (lines). I would like to use Leaflet Elevation plugin to display an elevation profile for each of those lines. The problem with my code is ...
0
votes
1answer
320 views

Leaflet Marker Cluster not appearing

I would like for my points to cluster using L.markerClusterGroup. I am receiving a 200 status; but nothing appears on my map. I have commented out my markers which appear when uncommented. ...
0
votes
1answer
135 views

serving UTFgrid information made with mb-util with leaflet

I've created the mbtiles file with tilemill and exported it on my ubuntu webfolder with the following command: mb-util --scheme=xyz /folder/tile.mbtiles /var/www/html/my-tiles To get utfgrid ...
0
votes
1answer
196 views

Leaflet controls are not appearing with Promise function

I am not receiving any errors in the console either. I am attempting to use the Promise function instead of callback. var map; var centerlatlng = L.latLng(38, -98); var aDiv; var geojsonfeatures; ...
0
votes
1answer
84 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
195 views

Unable to integrate CartoDB into Leaflet Map

This is my first day with CartoDB, trying to integrate our visualization into our existing Leaflet implementation, and having issues. In short: no visualization. Below is a sample of the problem ...
0
votes
1answer
146 views

ST_AsGeoJSON function slow in PostGIS

I'm currently trying to pull neighborhood data from Zillow's Neighborhood page (http://www.zillow.com/howto/api/neighborhood-boundaries.htm) and then load it onto a leaflet map, openstreetmap. I ...
0
votes
1answer
175 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 ...
1
vote
0answers
102 views

delete the markers in routing mode of MapQuest

I am using MapQuest plugin for LeafletJS. After it draw the map, it sets a marker on each stop point on the route, e.g: A, B, C, D, etc. Is there a way to remove those markers, I just need blue ...
3
votes
3answers
1k views

'Home' button leaflet map

is there a possibility to have a kind of home button on my map which will zoom to my initial map view or a specific defined position, resp.? Any help welcome! Thanks
0
votes
1answer
166 views

how do i change my map's styling in mapbox using mapbox.js?

i really searched for it high and low but couldn't find it!! I am using mapbox.js for this. i am working on the project which requires to change the styling of map, eg: area,land and water colors on ...
3
votes
0answers
101 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 ...
1
vote
1answer
140 views

Leaflet - what to do when your maptiles don't load?

I'm using Leaflet, and using OSM's tile.openstreetmap.org tile server. However, sometimes my application does not load the maps tiles. It seems OSM's servers are having some problems sporadically, ...
1
vote
1answer
180 views

Leaflet Draw - Get Circle extent

I am using Leaflet.Draw to draw a circle. var circle = L.circle(new L.LatLng(latitude, longitude), number, circle_options).addTo(featureGroup); I need the coordinates of the circle as a polygon ...
1
vote
0answers
261 views

Geoserver GetCapabilities and CORS

Using WMS I do a GetCapabilities request on a geoserver. This works in FireFox, but nog in Chrome, Safari and Internet Explorer. The point is that in de web.xml from the server I did add: ...
0
votes
1answer
305 views

Add 'name' from GeoJSON to Leaflet List Markers control

Im my web app I use Leaflet List Markers plugin (https://github.com/stefanocudini/leaflet-list-markers). Markers loaded as GeoJSON from GeoServer. I want dispaly name of markers in list control, but ...
1
vote
1answer
349 views

Leaflet interactive styling does not reset style correctly on mexican state geojson layer

I adapted the leaflet tutorial for an interactive choropleth map to create hover highlights and zoom functionality to my Mexican states map. Oddly, when I test out the highlight it leaves certain ...
4
votes
1answer
287 views

Leaflet: Change point icon (geoJSON) on click and change back when clicking another point

I would be very grateful if someone could help me with this. I have a geoJSON (10 points) that is drawn using an icon. I want to change the icon when I click on one of the points and then I want to ...
2
votes
1answer
63 views

Layer toggle disappears leaflet

I'm having a bit of trouble finalizing a project I'm working on. When I upload my map to filezilla, my map layer toggle doesn't show up: before uploaded: after uploaded: Does anyone have any idea ...
6
votes
2answers
128 views

Access geojson from github in leaflet

I am new to json, github, and leaflet. But I am trying to create a simple application which will render my points which are in geojson up on github. From everything I have read this should work. ...
1
vote
1answer
134 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 ...
2
votes
1answer
133 views

Export TileMill project as SVG image with CartoCSS applied to it

I am able to export TileMill project as mbtiles and rendering tiles on map using leaflet which is working fine. But if I export the project as SVG or PNG image the CartoCSS which I have written is not ...
1
vote
1answer
228 views

Geoserver WFS GeoJSON layer in Leaflet, having trouble diagnosing 'Uncaught TypeError: undefined is not a function (Anonymous Function)' error

Pardon me if this has been addressed, I searched as far as I could for similar errors. I'm trying to serve a large amount of polyline data as a geoJSON layer from GeoServer to a Leaflet instance. ...
4
votes
2answers
237 views

Loss of synchronization between map and markers (Leaflet + Google Maps)

I have a problem using the markers with Google Maps with Leaflet. In this example you can see the difference between Google Maps or OSM. Using OSM, the marker moves with the map but when using Google ...
1
vote
0answers
339 views

leaflet: how to show draw control in custom (own) div?

I'm trying to put a Control into an existing div but I don't really know where or how I can force the map.addControl method to show the control (it is a draw control by the way) within an already ...
4
votes
1answer
101 views

Routing ensuring all areas are touched

I'm making a web application with leaflet and OSM. It's all going well, but now I need a little help. I'm searching for a good routing engine, that's capable of creating the most probably taken route ...
0
votes
2answers
385 views

MiniMap in Leaflet

I am trying to get a webmap working with leaflet.js. I found the beautiful addon of a MiniMap. But I do not get how it works. It works, if I only have one baselayer; MiniMaps shows up correctly. If I ...
0
votes
2answers
152 views

Tilt of OpenStreetMap with LeafletJs

I am using LeafletJs as mapping library for OpenStreetMaps. Is there any method map.Tilt() in Leaflet api like google provides map = new google.maps.Map(document.getElementById('map-canvas'), { ...
4
votes
1answer
236 views

Legend items to appear / disappear simultaneaously with Layer turned on/off in Layer Control

I have a number of layers that can be turned on and off with a Layer Control. I’d like the description of each layer to show in the legend if it's turned on. And disappear again as soon as the layer ...
1
vote
1answer
114 views

CartoDB JSONP callback in leaflet-search plugin

long time reader, first time question-asker etc... So I'm trying to implement a search function on an app I'm building using data from cartodb in leaflet and this leaflet-search plugin: ...
0
votes
0answers
263 views

Leaflet vs Openlayers vs Geoserver for overlapping polygons application

I have 3 layers of vector polygons(about 80 polygons - 1MB geojson each but I haven't simplified any yet) displaying school territories (kindergardens, primary and secondary education) and I want to ...
0
votes
1answer
280 views

Mapbox.js/leaflet.js working in FF but not in IE

I am a noob writing leaflet/Mapbox code. I got a map with the following code. Works like charm in FF but cannot see anything in IE. Maybe it is just a comma error like here? Hopefully someone can ...
0
votes
0answers
89 views

How to create a query dialog with MapBox JS?

I like to have a query dialog in the map in order to filter data according to specified fields and attributes selected by the user. Example: user may want to select a state via a dropdown menu and ...
2
votes
1answer
102 views

Leaflet - draggable marker and coordinates display in a field form

I have to do a draggable marker and its coordinates should be displayed in fields. It will be a part of a contact form in PHP. I created a draggable marker, help me what to do now. var marker = ...
0
votes
0answers
98 views

How to Show the Lat/Long of Marker in a Textbox if it has been clicked

function getInfo() { $.getJSON("get_info.php", function (data) { for (var i = 0; i < data.length; i++) { var location = new L.LatLng(data[i].lat, data[i].lng); ...
2
votes
2answers
224 views

IE8 issue with Leaflet and CartoDB

Hi all having some trouble getting this map to work in IE8. Currently tried using some of the old IE8 CSS for both but that didn't seem to work. Any ideas for this? Here is the code for the main map: ...
1
vote
2answers
272 views

CartoDB Runtime Layers with Angular

Has anyone ever tried adding a CartoDB runtime layer to a leaflet using an Angular Directive or angular-leaflet-directive (Leaflet Javascript Library)? I tried this, which does not throw errors but ...
2
votes
1answer
200 views

L.esri.featureLayer shows up and sometimes not

I'm new to the leaflet/esri subject so please forgive me if it's just a simple question. I wrote my first webmap-app. It uses different sources. The main aim is to show two basemaps hosted by MapBox ...
2
votes
0answers
57 views

Is it possible to hatch format railroads in leaflet?

Within mapbox tilemill it is possible to make make rail-roads like this: To achieve this you need to write the following code: Source #railroads { ::line, ::hatch { line-color: #777; } ::line { ...
0
votes
1answer
467 views

Transfer Data from Database to Leaflet POP UP

Good Day too all! I just wanna ask a little question. Ahmm how do you show data from database to leaflet pop up? Here is my code in php select command <?php $db = new ...
0
votes
1answer
407 views

Overlay single, non georeferenced image in Leaflet?

I'm wondering whether it would be possible to somehow overlay a 3rd party, changing non-georeferenced image such as: If the image was static, I'd use mapwarper.net. But it's not. So is there a way ...
2
votes
2answers
223 views

Highlighting features in qgis2leaf export

I have exported a QGIS map to Leaflet using the qgis2leaf plugin. I am looking for some assistance as to how to highlight features (polylines) when the mouse hovers over it. I just want the polyline ...