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

learn more… | top users | synonyms (1)

1
vote
0answers
28 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
1answer
151 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
160 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
0answers
47 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 ...
1
vote
0answers
86 views

send viewparams geoserver using leaflet

I need to pass my longitudes and latitudes of origin and destination for a sql view in geoserver to get a WMS layer with the route. I've performed in qgis to view and is working perfectly. This is ...
2
votes
0answers
48 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
1answer
489 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
48 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 ...
1
vote
1answer
162 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
0answers
137 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
0answers
63 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
0answers
88 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) { ...
0
votes
1answer
81 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
100 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 ...
0
votes
2answers
45 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 ...
1
vote
1answer
166 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
0answers
148 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
63 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
0answers
210 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
31 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 ...
0
votes
1answer
55 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, ...
1
vote
1answer
190 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
0answers
26 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 ...
2
votes
0answers
72 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
85 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
47 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 ...
1
vote
3answers
600 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
42 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
62 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 ...
0
votes
0answers
121 views

How to use different popup styles in the same leaflet web map for different dynamic map layers

I am very new to javascript, CSS and HTML. I have been playing around with leaflet and have been trying to figure out a way to customize popups for different features in my map. Is there a way to do ...
1
vote
0answers
113 views

How do I use Proj4Leaflet projections correctly?

I'm loading data layers from a WMS server into a Leaflet map, and I need to give the user a choice of projections. For the WMS server requests, I just need to change the CRS parameter to a different ...
3
votes
3answers
266 views

Offline Map Service with Mapnik and Leaflet

I'm relatively new to GIS, so I hope my asking doesn't appear to be ignorant in any way. I currently work on an offline map service solution for usage in areas without internet connection. For that ...
2
votes
0answers
37 views

How do I change polygon opacity using a esri WFS in leaflet?

Note...Solved and here for anyone having this problem...damn simple problem, I had not used a higher case character for fillcolor and fillopacity....they should be fillColor and fillOpacity , it ...
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 ...
6
votes
4answers
281 views

How to use Leaflet to efficiently show parts of a massive dataset?

I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is. There is some dataset of thousands of items. We want to show a map to the user, with the ...
1
vote
1answer
52 views

How can I make Leaflet tiles appear in a page? [closed]

I am having trouble with leaflet working, but not displaying any of the background tiles in the page. This one is using the leaflet-rails gem in a Rails app. This is just in an html sample page: ...
5
votes
2answers
182 views

Leaflet: How to enable pan & zoom while GeoJSON still rendering?

I've overlaid a huge GeoJSON geometry on top of my Leaflet map, covering about 20 countries' borderlines (about 1,5 million vertices) using "L.geoJson". Each time I zoom in/out, the computer has to ...
2
votes
1answer
204 views

Make Leaflet Map Background Transparent

How can i make the background of the leaflet map transparent. I see opacity controls from the layers, but not the map background. Should the be changed just with plain CSS? Thanks
2
votes
1answer
205 views

Viewing map tiles generated from Maperitive in leaflet or openlayers

for few days i have been working on developing my own osm tile server. I tried it on linux as well as on windows, no complete success till now. I Have to make tile server on both windows and linux. ...
3
votes
2answers
805 views

Disable panning/dragging on leaflet map for div within map

This may be a bit trivial, but does anyone know how to suppress panning when you click and drag over top of a div box embedded within the map itself? Not sure if this question has been asked in ...
1
vote
1answer
57 views

layer priority over basemap

Hello I was trying to but together a quick and dirty bing/osm map using leaflet and leaflet plugin. My problem comes in when adding a layer from cartodb.The points do not show and I am not getting ...
1
vote
2answers
66 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. ...
1
vote
0answers
17 views

using gzipped js files in windows 8 OS

Previously, we were using a private ISP to run our web site. They were using LINUX. We could use js.gz files to serve interactive maps. Now, we have our own server with Windows 8 OS. How we can serve ...
0
votes
1answer
75 views

Optimum set up for large data sets such as mobile service coverage maps [closed]

When serving up large data sets such as mobile coverage maps (custom tile) mashed up with MapQuest maps and MapQuest POIs, is there any performance benefit to using shape file VS WMS tile PNGs? Any ...
3
votes
1answer
108 views

Day and night zone layer for Leaflet

I'm working with Leaflet and I'd like to show the day and night zones adding a dynamic layer to my map. I was thinking to add a static layer with some transparency and make it move every x minutes but ...
0
votes
0answers
85 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 ...
5
votes
3answers
286 views

Guidance when to style your features in Tilemill vs. Leaflet?

I've found this generally to be dependent on each project's goals (or what the client wants), but when you have the options, what any rules of thumb or guidelines do use you in a project to determine ...
0
votes
1answer
66 views

Millions of polygons: displaying layers in Leaflet based on location being viewed?

I'm trying to create a map of all parcels in a state. In my state, this is several million parcels. In their current format, they are encoded as topojson and divided up by county. I'd like to show ...
2
votes
1answer
62 views

Is it possible to use two layer.bindPopup functions in Leaflet

I have two different layers in a leaflet map. I have one layer in which I would like the popup to return some text from the layer's attributes. They other layer I would like the popup to return an ...
0
votes
1answer
169 views

fitBounds on points after feature selection

I am trying to follow some of the examples I have found here and in Google Groups about fitBounds for points. Most of the examples are for polygons and don't seem to work for points. I think I've ...