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

learn more… | top users | synonyms (1)

0
votes
0answers
3 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 ...
0
votes
0answers
7 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 ...
2
votes
1answer
384 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
47 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
19 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
49 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 ...
2
votes
1answer
244 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 ...
3
votes
1answer
460 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 ...
1
vote
1answer
31 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
2answers
1k 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
149 views

Changing list-item css class using ng-class when mousing over Leaflet Map Markers

I've got a doozy of an ng-class problem. So I have an app with a map/markers on the right and a list-item menu on the left with info about the markers (like Yelp or Foursquare). With some of my ...
1
vote
1answer
22 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 ...
1
vote
1answer
225 views

TypeError in leaflet on zoom in or out

I am working on an application that renders land parcels from PostGIS as polygons in Leaflet. I have an event handler set for 'viewreset' on the map: this.leaflet_map.on('viewreset', ...
5
votes
1answer
157 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
10 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
131 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
28 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 (! ...
0
votes
1answer
88 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 ...
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
825 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
268 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
23 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
61 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
46 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 ...
2
votes
3answers
119 views

Integrate Leaflet map into PDF

I am current in the process of writing a thesis. Being in the field of GIS it obviously involves some maps ;). While the whole world switched to interactive online maps, Universities still require to ...
0
votes
1answer
70 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
2answers
364 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
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
83 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
26 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
75 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
170 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
2k 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 ...
1
vote
1answer
105 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 ...
4
votes
2answers
114 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 ...
2
votes
0answers
351 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. ...
2
votes
1answer
36 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
33 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
49 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?
1
vote
1answer
29 views

Leaflet: how to use a custom marker on a geojson layer?

I'm trying to put on a Leaflet map a geojson and all works fine until I use the default blu marker. Now I'd like to use a custom marker (a little .png icon) and I've changed my code in the follow ...
1
vote
2answers
2k views

How to project pixel coordinates in leaflet?

I am trying to create a map based on an image which is 16384x16384 px, but I would also like to add markers at specific locations using pixel coordinates of this given image. I created a tile layer, ...
0
votes
1answer
35 views

How to make polygons clickable in Leaflet.js / folium

I'm trying to create a clickable leaflet.js map using folium and Python. After a previous query - answered here Geopandas/folium map not displaying - I've added the polygons. But I'm getting a ...
0
votes
2answers
46 views

Change marker color based on GeoJSON filter in Leaftlet

This is what I would like to do: Display all features of a GeoJSON file using Leaflet. Provide a text box where a property can be entered, if any of the GeoJSON properties match with what is entered ...
1
vote
1answer
335 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 ...
2
votes
1answer
162 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 = ...
0
votes
1answer
73 views

Bootstrap3 Resize map height for phone

I have a leaflet map in a bootstrap 3 html application. I have content both above and below the the map which has a height of 600px. When I access the application from a phone, the width of the map ...
3
votes
3answers
3k views

Sizing Leaflet Map inside bootstrap

I have been trying to change the height of my leaflet map to a percentage inside of bootstrap but everytime I do the map will not draw. Thus, I always have to revert to px value. I'm pretty sure its a ...
1
vote
3answers
167 views

Bootstrap and Leaflet - Grid Issue

Trying to use integrate a simple leaflet map within Bootstrap grid / column. While I am trying to follow tutorials and templates, for some reason the <div> id="map"</div>does not seem to ...
2
votes
1answer
620 views

How to keep bound popups from opening on [click]?

I am working on a map application which creates and binds popups on markers and polyline objects. The popups are created and bound lazily, i.e. ad-hoc when a user clicks on a specific object. The ...