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

learn more… | top users | synonyms (1)

1
vote
1answer
185 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
1answer
86 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
25 views

Add 'name' from GeoJSON to Leaflet List Markers control

Im my web app (example http://spatialhast.github.io/leaflet.list.marker) I use Leaflet List Markers plugin (https://github.com/stefanocudini/leaflet-list-markers). Markers loaded as GeoJSON from ...
1
vote
0answers
11 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
12 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: ...
4
votes
1answer
237 views

Leaflet - Change style on click

I am beginer with Leaflet library and I am facing an issue with a geojson. I have an extern geojson file (points) and I would like to display a circle for each point coordinates and get a bigger ...
4
votes
2answers
45 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
13 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 ...
3
votes
1answer
13 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 ...
1
vote
1answer
23 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 ...
1
vote
2answers
376 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 ...
1
vote
1answer
27 views

IE8 problem with proj4.js

This problem is in IE8 and not in Firefox. My first problem was that IE8 don't support JSON natively and I get the "JSON is undefined". I solved this by including json2 or json3. Now JSON.parse ...
3
votes
2answers
34 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 ...
2
votes
2answers
1k views

How do I modify features during runtime, in a GeoJSON feature group on Leaflet?

I have added some GeoJSON to my Leaflet powered map as below. (Altered version) var array_of_layers = L.layerGroup([]); var styleholder = []; var belgium_style = {color: "#d3e46f"}; var bosnia_style ...
1
vote
1answer
30 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
29 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
27 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. ...
0
votes
0answers
18 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
3answers
137 views

Plot a Raster of Weather data in Leaflet JavaScript Map without generating server-side tiles?

I want to show different weather data I have as binary arrays on a server using leaflet. But I do not want to generate tiles on the server. For each point in an a array I have the coordinates in ...
1
vote
1answer
31 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
2answers
71 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 ...
4
votes
1answer
78 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
1answer
338 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
2answers
28 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'), { ...
1
vote
3answers
578 views

How to change Leaflet marker color on mouseover?

I'm having a hard time figuring out why the Leaflet method setstyle will change the color of a polygon but not the color of my markers. Polygon works fine: But the markers won't change colors: ...
4
votes
1answer
52 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 ...
0
votes
1answer
30 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 ...
0
votes
0answers
51 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 ...
1
vote
2answers
65 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 ...
1
vote
1answer
340 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
23 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 ...
0
votes
1answer
28 views

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

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 ...
2
votes
1answer
183 views

How does one use leaflet layergroups with CartoDB layers?

I'm trying to use leaflet layergroups with a cartodb layer, ala: http://leafletjs.com/reference.html#layergroup but haven't been able to successfully do it. This is what I have so far: var map = ...
2
votes
1answer
31 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 = ...
1
vote
1answer
111 views

Moving from OpenLayers to Leaflet breaks tilecache

My tilecache.cfg is like so (working with MapServer) [mylayer] type=WMS url=http://server/mapserver/app spherical_mercator=true layers=mylayer The following works just fine var mylayer = new ...
1
vote
2answers
639 views

Unable to get Mapbox leaflet-omnivore to load markers from .csv

I'm using the Mapbox.js API to build a really simple web map using a .csv file to place markers with tooltips. I'm trying to use the suggested leaflet-omnivore library to easily parse the csv and ...
0
votes
0answers
21 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
42 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
234 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 ...
2
votes
1answer
104 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
2answers
44 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 ...
1
vote
1answer
191 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
0
votes
1answer
35 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 ...
2
votes
1answer
42 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
15 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 { ...
1
vote
1answer
15 views

Possible to show aggregate votes in a tooltip on a markercluster?

I'm building an interface that would take poll data in and show some results over a marker cluster using Mapbox but I don't have any experience with it. The interface would look much like ...
2
votes
2answers
69 views

Add custom variables to leaflet polyline

I'm drawing a route on a map with leaflet. I'd like to click on any point in the line and display the speed and time at that point in a popup ($speed[$i]). latlngs = [<?php for ...
9
votes
2answers
6k views

How to get Leaflet interactivity from Geoserver WMS?

I have geoserver serving shapefiles as a WMS into Leaflet. I'd like to add interativity that shows a popup with WMS attributes in the Leaflet map when the user hovers over or clicks on a WMS feature. ...
6
votes
1answer
846 views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
0
votes
1answer
47 views

Leaflet Layer Controler

I've got a strange behavior with my map. I wanted to have to basemaps and one overlay. I've defined classes but when I try to change them via LayerControl I only get one same map. Could you please ...