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

learn more… | top users | synonyms (1)

0
votes
0answers
27 views

Unable to identify the colours on leaflet

var non_tfl_lines_JubileetoIlford = L.geoJson(non_tfl_lines_JubileetoIlford, { pointToLayer: function(feature, latlng) { switch (feature.geometry.type) { case 'LineString': return new ...
1
vote
1answer
112 views

Adding popup to geojson layer based on feature property?

I'm using leaflet and trying to add a popup to a point on the map that will return a property of the point from the geojson file. Going off this post has been helpful problem adding pop-up to GeoJSON ...
0
votes
0answers
59 views

Run-time substitution on MapServer with Leaflet

I have a MapServer instance and map file displaying data in selected countries using a Leaflet WMS tileLayer. This map file works to display points from a single country (showing the LAYER definition ...
2
votes
1answer
44 views

Distort image to display on leaflet.js based on known 16x16 point grid

I have an image that is a satellite picture, and with php gd I want to distort it so I can overlay it on a leaflet.js map. To make it a bit more simple, I have a grid of points, 16x16 which bind the ...
2
votes
1answer
90 views

openlayers leaflet and popup

I am working on a map mixing openlayers and leaflet librairies (it is possible, correct ?). I am such a beginner that, after lots of readings, I thought creating popups was less difficult for me ...
3
votes
3answers
4k views

How to add text-only labels on Leaflet map with no icon

I'm looking for a way to show text on Leaflet map using markers or anything else without showing any icon. I want to show text only and be able to style and rotate it... Any suggestion? Thanks a lot ...
1
vote
1answer
107 views

Leaflet HTTP.Get bad request; not loading tiles

I am trying to walk through the Leaflet quick start tutorial and am having a really simple issue: None of my tiles are loading. I get this error at the image url and an HTTP Bad Request in the ...
4
votes
1answer
189 views

*Leaflet* mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the ...
5
votes
3answers
6k views

Custom Leaflet Controls

I have gotton some help in creating a custom control for leaflet, but I am still having trouble upgrading to the CSS styles used by the latest versions of Leaflet. Basically, all I need is a icon in ...
4
votes
1answer
1k views

Does Leaflet has option for scale dependent layers?

Is it possible to show layers with Leaflet depending on scaling? For example not show counties until zoom level reaches 10. Thanks.
1
vote
1answer
59 views

Is there a way to have a choropleth map in Excel reading data from a sheet?

Is it possible to have a solution similar to ESRI maps for office in which I want basically a geojson file or any file for that matters to render a choropleth map based on data in a sheet? Tried ...
1
vote
1answer
69 views

Leaflet Draw - add title to marker or shape?

I am trying to create a participatory mapping site where users can draw pts, lines and polys using Leaflet draw. Is it possible to create a pop window where users can add a title or description of ...
2
votes
1answer
67 views

Display a link in a popup with Leaflet

Hey there! Im working with the Leaflet javascript library. There should be an option to click on my map and view a popup. I already have a code for that: var popup = L.popup(); function ...
0
votes
1answer
70 views

Displaying geojson data in leaflet

I am trying to access and display some data in a geojson layer and would appreciate if someone can take a look at my code below and suggest what I need to do to make it work. The result of the ...
0
votes
0answers
16 views

GeoJSON of half the earth [duplicate]

I'm currently trying to model daytime/nighttime in leaflet, and the only way I currently see me being able to do that is to have a GeoJSON polygon reflecting half of the earth (for daytime/nighttime ...
0
votes
1answer
85 views

Displaying click results in a side panel

I am trying to do something similar to the interactive choropleth map (http://leafletjs.com/examples/choropleth.html) on leaflet's website. In my case I want to use a click instead of a hover and ...
2
votes
0answers
29 views

What is the best way to handle metadata with TileStache?

When I'm serving up maps and UtfGrids with tileStache I would like to also include some metadata with the layers so that my leaflet application can understand the context of the layer. For example: ...
5
votes
2answers
164 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 ...
0
votes
1answer
753 views

Leaflet error: Uncaught TypeError: Cannot read property '_controlCorners'

I'm trying to implement the Leaflet choropleth example on a map I already built. I've followed the instructions and seen many implementations of the i.control and control hover option on Github but ...
0
votes
0answers
34 views

Leaflet.js - drag marker from popup

I am trying to allow markers to be dragged via their popup. On mobile devices the marker position to is hard to see underneath the user's finger. If an area on the popup can be designated as an anchor ...
3
votes
3answers
413 views

Is it possible to check incoming GeoJSON to see if any of the features are identical to existing ones before adding to map?

I am working on a Rails/PostGIS app and doing a typical ajax call to retrieve GeoJSON within the map viewport bounds. Whenever the map is shifted or zoomed all of the markers are removed and then ...
1
vote
1answer
35 views

How to insert a map into another map?

If you look at this site it has a main map window but it also has a small window map at the top right corner. What is the technical term for the smaller window? How is that window created? I am ...
0
votes
0answers
28 views

MySQL Select rows where line strings are within a bounding box

I have a MySQL DB with some spatial data stored in a table after being input via ogr2ogr from a shapefile. The structure is similar to the following: OGR_FID int SHAPE geometry (all line ...
0
votes
0answers
10 views

How to set up proxy for Geoserver GetFeatureInfo call? [duplicate]

I have problems with cross domain, I call GetFeatureInfo in Leaflet API. I was looking for solution and saw that proxy could solve that problem. Can you help me how to set it up? I have geoserver run ...
1
vote
0answers
59 views

Multiple Leaflet maps on website in different divs

I'm pretty new to leaflet.js and I'm trying to figure out how to assign the same map with the same set of options and layers to a different HTML container instead of having to remove and add a new one ...
1
vote
0answers
131 views

Passing ng-directive to Leaflet L.popup().setContent() [closed]

Goal: Pass an Angular directive to the .setContent() method of L.popup() The Problem: I need to run $compile on the directive in order for it to enter ng. But something like: ...
2
votes
0answers
41 views

Stray horizontal lines after converting from GeoJSON to topojson

After converting a GeoJSON file to topojson, and loading the topojson into Leaflet, stray lines appear in the resulting map. Like this: What is causing this? If I view the GeoJSON, these stray ...
1
vote
1answer
59 views

Geocode free APi for internal application

I need opinions / experienced use on this issue: Which API can be used to geocode an internal application of a company that meets these requirements: Can be used for company internal application ...
0
votes
1answer
569 views

Why WMS Image Repeat leaflet?

I setup wms service using mapserver, the map file is attached . I have created index page, the code is <!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8" /> ...
4
votes
1answer
85 views

Leaflet: how to change default style on a point GeoJSON Layer?

I need to change style on a point GeoJSON layer in a Leaflet map. I'm using the following code: function onEachFeature(feature, layer) { if (feature.properties && ...
0
votes
0answers
22 views

Leaflet: verify when a layer is checked in control layers

I'm a newbie in Leaflet, so sorry for the entry level question .... Is there any way to test if a layer in Control Layers is checked or not? I don't find any in API documentation.
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
0answers
97 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 ...
1
vote
0answers
34 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
173 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
27 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
58 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
46 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
1answer
109 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? ...
1
vote
0answers
68 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 ...
14
votes
6answers
4k 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
131 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 ...
2
votes
0answers
45 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
74 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
81 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 ...
1
vote
0answers
75 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
0answers
113 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
30 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 ...
3
votes
2answers
99 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 ...
0
votes
0answers
82 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 ...