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

learn more… | top users | synonyms

1
vote
0answers
38 views

Popups not showing on layer/feature/marker groups

I had two problems. One was that, once I got lots of markers in one layer, and lots of polylines in another, someof my markers, starting from the north, started to vanish. I noted in the doco that ...
1
vote
0answers
29 views

How to get the total route km route using machine leaflet

I'm using machine leaflet route to draw routes I can get the total route miles ?? How can I do this? I know the class IRouteSummary http://www.liedman.net/leaflet-routing-machine/api/#iroutesummary ...
0
votes
1answer
305 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 ...
1
vote
0answers
21 views

Geocoder leaflet for internal use in the company, which take addresses from any part of the street

I am making a personal application routing to be used internally in the company using machine leaflet route. The plugin uses nominatim geocoder, but he geocodificia according to the links of the OSM. ...
0
votes
1answer
39 views

Error with Leaflet Routing Machine

I downloaded the Leaflet Routing Machine from https://github.com/perliedman/leaflet-routing-machine. Unzipped and opened the index.html in my browser to see how it looks, and got an error as shown in ...
1
vote
0answers
17 views

Leaflet: Is there a way to use click event just like mouseout?

I made a map with leaflet by following the official Leaflet tutorial on interactive choropleth maps. I would like to make the map compatible with smartphones, so I added a click event, which acts ...
1
vote
0answers
23 views

What is wrong with my data receiving from php script for geoJSON TileLayer?

I want to get geo data as geojson for geojson tile layer requests in leaflet. I set up a geojson layer like this: https://github.com/glenrobertson/leaflet-tilelayer-geojson/ A php script answers ...
1
vote
0answers
36 views

Show large information in a map (millions of points)

I have millions of points (census data) about 1.5Gb in a text file. But I only want to show an area based on this points like a heat map, so maybe I have to build polygons based on these points. What ...
8
votes
1answer
175 views

Mercator bias plot in Leaflet

I was inspired by this wikipedia image from the mercator projections page to hack around with leaflet. The idea was to interactively have your cursor move a continent and that it would be corrected ...
1
vote
1answer
25 views

Query and Visualize GeoJSON data [closed]

I am trying to visualize specific GeoJSON data. I am successfully loading the full GeoJSON file (Multipolygon) using Leaflet JS. Is there any query to find specific polygon from that GeoJSON file? ...
2
votes
1answer
24 views

Easy way to render TileMill tiles in retina mode with Leaflet?

I have a few quick little map websites that run straight off TileMill, without pre-exporting. They usually have code like this: L.tileLayer('http://example.com:20008/tile/MyMap/{z}/{x}/{y}.png', ...
1
vote
1answer
81 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 ...
2
votes
1answer
212 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
2answers
1k 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 ...
13
votes
6answers
3k views

Visualizing large datasets with Leaflet

When using Leaflet to visualize a large dataset (GeoJSON with 10,000 point features), not surprisingly the browser crashes or hangs. A sub-sample of 1000 features from the same dataset works ...
1
vote
1answer
39 views

Leaflet WMS GetFeatureInfo gives result only on zoom level 10

I am using GetFeatureInfo with wms layer to get the data behind. The request returns data only after zoom level 10 before that it returns empty features. Does anyone having same issue? I think it ...
1
vote
1answer
61 views

How to use Leaflet Marker Cluster on markers from Leaflet-layerJSON (Overpass API)

I'm having troubles getting the Leaflet Marker Cluster working with Leaflet-layerJSON. I'm trying to make a Leaflet map with data from OpenStreetMap. The markers are showing on the map, but they are ...
2
votes
0answers
29 views

loading geojson in leaflet

I just added the geoJSON vector layer in leaflet for my hybrid mobile app using phonegap, the problem is that when I add the geoJSON file of size larger than 2mb the application crashes. What is the ...
0
votes
1answer
46 views

Does the experimental QGIS2leaf plugin not work on mac OS?

I am trying to get the experimental QGIS2leaf (Leaflet web maps) plugin to work on my macbook air (2012, Mavericks OS), but when I open the outputted index.html file, no interactive image shows up in ...
0
votes
0answers
63 views

Radius based search with Leaflet maps

Using leaflet I have created a simple map, played around with markers (adding/removing) and have added some GeoJSON data polygons etc. I now need help with implementing a radius search. For example I ...
2
votes
1answer
785 views

UTM Grid as a Layer with Leaflet

How can I display a UTM Grid as a layer with Leaflet? Search a way to embed a OpenStreetMap map with Leaflet in a website. Particularity. I want to display a UTM Grid as a Layer. In addition, lower ...
1
vote
0answers
25 views

Callback method geocode items nominatim not work

function addr_search() { var inp = document.getElementById("addr"); $.getJSON('http://nominatim.openstreetmap.org/search?format=json&limit=5&q=' + inp.value, function(data) { ...
1
vote
0answers
29 views

Adding marker on a leaflet map

I'm very new to GIS and for learning I started with building a simple web app with GeoDjango. I am using dango-leaflet. Since I have a very limited knowledge I am facing many challenges. I'm trying to ...
1
vote
1answer
195 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', ...
0
votes
0answers
20 views

Formating geojson file with leaflet ajax-plugin

First of all I apologize for my basic english. I have to say, too, that I'm really a newby in coding. I'm trying to create an interactive map using leaflet (you can see it here). I was able to show my ...
1
vote
2answers
791 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
0answers
26 views

Serving data based on tiles

I am new to mapping and displaying data on maps. I was trying to display markers on a map where each marker represents a point of interest on my map. Using leaflet it is quite straight forward to add ...
4
votes
1answer
165 views

Editing PostGIS topology in a web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
3
votes
2answers
89 views

How to display information in a div outside the map?

I tried a bit around and created a simple map with two polygons(most of the code I got from the Interactive Choropleth Map Tutorial). I added a "L.control()" to show information about the polygons in ...
2
votes
1answer
232 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
0answers
19 views

GeoJson layers with leaflet in IE8

I have built a website displaying a lot of line shapes, using geojson, on a leaflet map. This is working relatively well in most browsers, though speed could be improved. As usual IE8 is being the ...
1
vote
2answers
317 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
36 views

Remove TileStache cache for a single feature

In a large parcel map, features are edited and need to be re-styled. I want to keep as much of the cache as possible, but invalidate the cache for features that are edited when the features are saved. ...
2
votes
1answer
517 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 ...
1
vote
1answer
50 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 ...
0
votes
1answer
16 views

Cartogram plugin for leaflet or OSM

Does anyone know if there is a plugin to make cartograms for leaflet ? I have sets of geotagged Twitter datas and I'd like to distord the map according to the density of tweets of every area of the ...
2
votes
1answer
87 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
0answers
40 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
0answers
38 views

Leaflet + GeoServer + British National Grid

I have followed along some examples and was able to display BNG 27700 data nicely on the map, however now I want to perform getFeatureInfo function on click. Again the code I used is as below: var ...
0
votes
1answer
27 views

Draw Complex shapes

Is it possible to draw complex shapes (polygons) like below image, combining lines and arcs. It is more like a Land Survey plan. So I have coordinates of each point and in case of arc - Radius, Chord, ...
0
votes
0answers
53 views

How to create dynamic legend for multiply layers with leaflet.js?

I want to create multiple choropleth maps which displays different statistical data with leaflet.js. So it would be nice to show different legends for each map. I create such legends for two layers ...
1
vote
0answers
27 views

Displaying a box with text on a leaflet map

Is there a way to display a label or textbox on a specific geo-place on a map produced by leaflet.js.? I know about the Marker- and Polygon Method But I can't find a way to put text in the polygon. I ...
1
vote
1answer
115 views

How do I import a PNG as a TileMill layer?

I want to use the NASA "Blue Marble" images as the basis of a map tile set for a Leaflet.js map. It seems like using TileMill is the easiest way of building up my tiles, and opens a lot of options ...
1
vote
0answers
16 views

geoserver wrong tile generation on leaflet

I am creating world map with bathymetry using Geoserver 2.5.1 and leaflet. It works perfactly upto certain zoom level. but after that i get few tiles drawn in wrong color as shows in images. Does ...
1
vote
1answer
37 views

How to add labels parallel to lines, polylines or multilines using Leaflet?

I want to add road name parellel to its line or if the line is curved, then the label should also be curved. How to add these name labels using leaflet? example image
0
votes
0answers
23 views

geojson object with different representations and label/popoup conten

I have a quite complex geojson in terms of vertexes. It holds all the information which is needed in the webmap. it serves as the input for many layers like this (example for two): var represenation1 ...
0
votes
2answers
72 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: ...
1
vote
0answers
37 views

How to go about creating a custom tool/adding special functionality for a web app

In my soon to be developed web app, I will have an image service and also a feature service that is essentially an index to the image service, with all kinds of attributes. I would like for the user ...
0
votes
0answers
31 views

How to hide overlays in Leaflet layerControl if geojson var not found?

i would like to perform a specific task: i have a set of geojson layers, loading features from local files. i have the layercontrol on the map showing available layers to show/hide now, regarding ...
1
vote
2answers
1k 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, ...