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

learn more… | top users | synonyms (1)

1
vote
2answers
72 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
341 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
31 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
185 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
35 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
117 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
646 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
24 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
45 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
237 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
2answers
49 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
41 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
43 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
18 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
80 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
875 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
49 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 ...
0
votes
1answer
111 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
1answer
39 views

Change point symbol in mapbox.js/leaflet/esri-leaflet.js

I am a complete nooby to the above libraries. Till now, everything shows up very fine. I got my mapbox as a basemap and added some point data provided by an ArcGIS Server. To get the AGS data onto ...
0
votes
0answers
18 views

Problem with Leaflet Boundary Canvas plugin

I'm trying to identify the source of a problem that I'm having, I cannot show a tile layer(created with gdal2tiles) inside a polygon generated in Leaflet, using the plug-in ...
2
votes
1answer
404 views

proj.4 definition for Moscow GCS_Bessel_1841 to WGS84 convertion

I'm developing an app which should show a map using Leaflet framework but i have no luck as the coordinate system on the map server differs from the one used by Leaflet. As a map server i use ...
0
votes
1answer
78 views

How to re-implement a Dojo application using Leaflet?

I apologize in advance if this is not the correct forum to ask my question. I have an web map application developed using the Dojo framework. However I would like to create the same web map ...
2
votes
1answer
43 views

Leafletjs get latlng center position of polyline

After drawing a polyline, I would like to draw a circle from the center of this line whose radius encompasses the entire line. For polyline's that have more than 2 points I can crudely get the center ...
1
vote
1answer
51 views

Leaflet - GPX - Clustering

I'm using Leaflet maps together with "Plugins by Pavel Shramov", which allows google usage and GPX file use. This bit was easy enough, but trying now to use markerClusterer. I've spent a few hours ...
1
vote
1answer
46 views

Changing size of cluster based on number of markers in Leaflet clustermarker

I'm currently using Leaflet's markercluster add-on, which is working really nicely for some of my initial maps. However, I'm wondering if there is a way to modify the clusters so that the size of the ...
5
votes
1answer
162 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 ...
0
votes
0answers
36 views

How to toggle legends with layers in Mapbox.js?

Map is currently toggling 23 layers using var = overlays. I want the respective layer legends to appear when layer is toggled on, and show legends of all ON layers. var map = L.map('map',{center: ...
0
votes
0answers
152 views

How to load an external WFS (GML output format) in a Leaflet map?

I need to build a Leaflet map loading data from this external WFS service http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Numeri_Civici_2012.map&service=wfs&request=getCapabilities with ...
1
vote
1answer
37 views

Get all tileLayers from L.map object in Leaflet

What is the best way to access all displayed tileLayers from a L.map object? Traditionally, I have stashed tileLayers in an object that I can access later, like so: var mapLayers = {} if (! ...
2
votes
2answers
5k views

How do I overlay a KML on leaflet 0.4.4

I am using Leaflet 0.4.4, I have a KML I would like to overlay on the map, how do I go about doing this? Edit: I am already aware of https://github.com/CloudMade/Leaflet/issues/14, which directs ...
1
vote
1answer
997 views

How to get LatLng array from geoJSON Layer in Leaflet?

i need to hand the latlng coordinates from my phpPostGIS-served geoJSONLayer as an array over to a new added HeatMap Layer. L.geoJSON has an build-in option: coordsToLatLng( coords )" and a static ...
2
votes
1answer
281 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
2answers
32 views

Leafletjs detect click/touch on layer

How do I detect a click on a layer and find out information about the layer that was clicked? Currently I can do the usual binding a popup and adding a click handler on the layer: ...
4
votes
1answer
64 views

Does leaflet.js offer an gutter option just like Openlayers

Currently we are switching from Openlayers to leaflet.js and there is a problem using a WMS layer with leaflet. The WMS being used is Deegree. When a layer is visualised within leaflet there are ...
3
votes
3answers
10k views

How to get the Lat, Long of a clicked location using Leaflet API?

I am using OSM with leaflet API. Now i want to get the lat and long of a clicked location. I meant something similar to this. ex: http://openlayers.org/dev/examples/click.html ...
2
votes
1answer
60 views

find inner bounds of a polygon in leaflet

How can I find the inner bounds of a polygon in leaflet? I a want to plot points randomly in polygoon but when I say Layer.getBounds() I get the bounds and I can still plot the markers ...
0
votes
1answer
116 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?
1
vote
1answer
94 views

Generate territory polygon from sets of points

I'm looking for a simple way to generate contiguous "territories" from sets of points. Say, points A, B and C are in territory 1, and D, E and F are in territory 2, then generate polygons that lie ...
1
vote
0answers
34 views

Legend not removed when layer changed

I made this webpage with JavaScript and CartoDB. The layer selector works like I expected it to but I noticed that the legend are stacking on top of each other and not being removed when the layer is ...
3
votes
2answers
80 views

How to update location via a data stream in OpenLayers or Leaflet?

I'm developing a application where I need to real-time update a Location of a Map using a data stream. I'm planing to use web-sockets. Are there any guides I can follow? Or can you guys direct me in ...
0
votes
1answer
208 views

Show map using esri leaflet, with 4326 spatial reference

I have this MapServer http://geoservices.big.go.id/arcgis/rest/services/RBI/Rupabumi/MapServer It turns out it uses 4326 spatial reference. I want to present it using leaflet, my code so far: ...
0
votes
2answers
3k views

Dynamically set zoom level based on a bounding box

I have a leaflet map whose size depends on the size of the browser window. I would like the zoom level to be dynamically chosen so that it is as zoomed in as possible while showing the entirety of the ...
2
votes
0answers
371 views

Data visualization techniques for web maps using ESRI and open source suites

I want to represent statistical data over the web map and looking the examples/techniques to represent data on the web map (apart from Pie-chat, bar graph) with new tools like gauge widget etc. ...
3
votes
1answer
48 views

How to display UtfGrid info

first off sorry if this question have been asked, I have been looking for an answer for some time now but cant find any solution. I have created a .mbtiles file with Tilemill, extracted the .png and ...
1
vote
1answer
41 views

Click Events with Leaflet and geoJSON

How do I attach a click event to a geoJSON that then executes an Ajax function when clicked. I looked into onEachFeature but that executes when the geoJSON is loaded, not when clicked, thus executing ...
2
votes
2answers
73 views

Search and zoom json features in Leaflet

How can I add search box to map that allows user to search>zoom to polygon name. If there are 100 polygons, user can type name of polygon (i.e., Symantec) then map zooms to matching county?