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

learn more… | top users | synonyms (1)

3
votes
1answer
523 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 ...
3
votes
0answers
499 views

Using Custom Map Projection On Leaflet

I have an application displaying a EPSG:3414 map running on Openlayers - jsfiddle working sample that works. I am trying to implement the same on Leaflet - jsfiddle non-working, it is not working as ...
3
votes
0answers
240 views

How do I format tilelayer.wms url properties such that I add an overlay iteratively to my base map in leaflet

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so: url: ...
3
votes
0answers
797 views

leaflet - Drawing line following the road

Short version: What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road. Long Version: I have several houses that I wish to mark ...
3
votes
0answers
966 views

How to serve OpenStreetMap Tiles locally using ArcGIS Server 10?

We want to serve OpenStreetMap Tiles locally using ArcGis Server 10 to use as base maps in our ESRI Silverlight and Flex GIS clients. We've downloaded our regions OSM file and created PNGs using ...
3
votes
0answers
363 views

How do I pass a LatLng Bounds from Leaflet to Mapfish Print?

I successfully fired up a MapFish print server on Elastic Beanstalk, and it prints out the sample spec files fine, but I'm trying to pass bounds from my Leaflet frontend now, and encountering a lot of ...
2
votes
2answers
579 views

Do the recent developments in the Google Maps API replace necessity of OpenLayers?

I think the main drawback of the Google Maps API is that we can't add our own vector data or raster imagery as one of the layers in the map. Is this correct? Or is there any alternative in the Google ...
2
votes
3answers
2k views

get latitude & longitude as per address given for leaflet

In my project I am using leaflet to display points. I am getting address from my database & want to show point for that particular address. I dident found anything which will give me latitude ...
2
votes
2answers
82 views

zoom over vector in leaflet

I have created a map from geojson file of administrative boundaries (polygons layer). Similar to this example. When the mouse is over the polygon feature, the cursor changes from hand to finger. In ...
2
votes
1answer
1k views

How to insert new line text in popup

I'm using Leaflet Marker Cluster and I need to show five different lines in a popup. But when I write this, they are all in the same line. Can someone help me to be one under another? var a = ...
2
votes
4answers
123 views

Sites that demo freely available Basemaps

I've seen such sites in the past. I remember seeing one put together by Wm Lerer at a conference a couple years ago. What I'm looking for is a map that demonstrates all (well, at least a lot) of the ...
2
votes
2answers
124 views

How to generate legend in leaflet webmap?

Although I have checked the "Create Legend" option in the qgis2leaf plugin, it did not generate any legend in the output webmap. What am I missing here ?
2
votes
2answers
319 views

How to load big geo-data file into web application

I am building a web app where I show details in map. I load data using geojson file (190 mb). I was looking in different possibilities to show the data, here there are: Leaflet GeoJSon: it should ...
2
votes
3answers
498 views

geoserver heatmap tiles doesn't display well (with leaflet)

I am trying to display a heatmap generated with geoserver on my map using the L.tileLayer.WMS class from Leaflet, but the tiles do not fit well together. Do you have any idea how to fix it?
2
votes
1answer
3k views

Disable leaflet interaction temporary

How can I temporary disable zoming/draging the Mapview in Leaflet.js Tried so many ways but without any luck. It's important to make it temporary and I also need the option to enable again.
2
votes
1answer
789 views

GeoServer Callback Function Undefinded

Any idea why the function loadThis() comes back as undefined? I've tried adding jsonp: false which doesn't help either. The json object is returned properly, I can view it in FireBug, but I can't get ...
2
votes
2answers
3k views

How to label GeoJSON polygons?

I'm using Leaflet combined with GeoJSON features. Is there a way to label GeoJSON features (in this case - polygons)? It should get labels from feature.properties.name This is my code where I ...
2
votes
1answer
1k views

Leaflet, wrong API key when using CloudMade tiles!

I've registered on CloudMade and got some API keys but non of them work with Leaflet API. When I checked for image URLs and opened each directly using my browser it prints out the message "Wrong ...
2
votes
1answer
2k views

How to change icons for Leaflet markers when using cluster plugin?

I'm using Leaflet MarkerCluster. I created a MarkerClusterGroup as markers1 as you can see. There's about a hundred points I have written like var addressPoints in this format: var addressPoints = ...
2
votes
2answers
423 views

How to pull lat/lng from a map canvas and update a database

So if i want to pull out lat/lngs after user clicks on a map canvas (lat/lngs are pulled using any javascript API (leaflet, wax etc.) and add this to a postgresql database using a query, how do i do ...
2
votes
2answers
141 views

Flannery compensation in Leaflet JS

I'm creating a bubble map using Leaflet JS. Everything is working smoothly (LeafletJS is awesome!) but now I'd like to try flannery compensation on the bubbles. I can't find the math anywhere though. ...
2
votes
2answers
562 views

Leaflet.geojson webpage performance out of hand, how to convert to .png?

I exported some countries as a single .geojson file. The file includes every country's vertices and coordinates, as that's what a .geojson is ─ a vector file. Thing is, there are about 20 countries ...
2
votes
1answer
4k views

Combine Leaflet with Geoserver WMS map

I'm not very skilled within the GIS world, however, I would like to know if it's possible to use this map: ...
2
votes
1answer
223 views

How to efficiently render and enable user interaction on thousands of points with Leaflet?

I've got a large dataset comprised of about 10k points representing gas stations. Some of these gas stations sell diesel fuel, others do not. In my web map, I want to let the user switch between ...
2
votes
3answers
1k views

gdal2tiles.py generates wrong tiles / MapTiler the right ones

I'm trying to generate tiles with gdal2tiles.py and the resulting tiles are stored as 18/132639/164219. If I do the same thing with MapTiler (the GUI variant of gdal2tiles) the tile result is ...
2
votes
3answers
3k views

Getting WFS data from Geoserver into leaflet

I'm trying to use a ajax call to load WFS data from geoserver into a GeoJson layer in leaflet. When I do the following message in the console: XMLHttpRequest cannot load ...
2
votes
2answers
2k views

leaflet and geojson tiles

New to mapping. Trying to create a heat map with data that updates every hour for US Counties with leaflet.js similar to http://leaflet.cloudmade.com/examples/choropleth-example.html. But, adding ...
2
votes
1answer
192 views

GeoJSON, circlemarkers using the Leaflet OverlappingMarkerSpiderfier plugin

I am wondering if I can use the Leaflet OverlappingMarkerSpiderfier plugin with my circlemarkers. I've loaded a GeoJSON file and added circlemarkers using; var gj = L.geoJson(route, { ...
2
votes
1answer
119 views

Using OSM Buildings in Leaflet: how to deactivate layer on loading map

I'm trying to use OSMBuildings in my Leaflet map. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>OSM Buildings Test</title> <link ...
2
votes
1answer
71 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 ...
2
votes
1answer
64 views

When I publish a layer(shapefile or postgis) with TileMill, 200 meters moves

I hope someone can help me. Not if you know the TileMill application I'm working with her to publish layers look more beautiful. Well, first I have posted directly loading the shp file., But when ...
2
votes
2answers
189 views

Sending map extent in (geo)JSON

I have a leaflet map that I need to fitBound on a given rectangle. The coordinate for the fit bound will be transfered in JSON via a REST call on a server. We are using GEOJson to encode our geometry ...
2
votes
1answer
298 views

Display a control (zoom bar) outside map container in Leaflet?

I need to extend a zoom control so that it is functional outside of the leaflet map container. Can this be done? Essentially,the same idea as what is accomplished with this item here but under the ...
2
votes
1answer
557 views

How can I load stricly tiles within the current viewport in Leaflet.js?

I have tiles that are not available for the whole map. How can I stop Leaflet.js/Mapbox.js from making requests to these tiles? There are dozens of 404's that I'd really like to get rid of. Thank ...
2
votes
1answer
665 views

Leaftlet and ArcGIS Server REST

I am fairly new to all of this and am looking for some guidance. Any information is appreciated! I am trying to use leaftlet to display shapefiles from an ArcGIS Server using the REST URL. I have ...
2
votes
1answer
359 views

How can I make a leaflet control open by default?

I'm using leaflet to display a map. I have a control section that I'd like to be open by default, but I can't find a way to do it through the API. Is there a way to do this?
2
votes
1answer
1k views

leaflet show miles/kilometers

Googlemaps shows you how large an area is on a map by showing a small bar with the number of miles/kilometers at the bottem left. Does leaflet also support this somehow? I do not see it listed in ...
2
votes
1answer
169 views

Is it necessary to add Tile layer background?

Is it necessary to add tile layer for making a GeoJSON data rendered in web browser using Leaflet or any other API ? I have a geoJSON data (I obtained the GeoJSON data by converting .shp file to ...
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 ...
2
votes
2answers
2k views

Animated lines and line styles in Javascript

I'm using Leaflet library and Mapbox. I need to create animated line from one city to another, slow motion "travelling" from one point to another point. Is that possible in javascript and how? I can ...
2
votes
1answer
32 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 = ...
2
votes
2answers
42 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: ...
2
votes
1answer
42 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
2answers
74 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
48 views

How do you get the nodes of an area in Overpass API in the “right” order?

I use the Overpass API to get the boundary of an OSM relation. I then use the result to display the boundary on a leaflet map. My problem is however, that the nodes are not in the "right order". ...
2
votes
2answers
70 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?
2
votes
1answer
60 views

How to get a table from a leaflet map?

I have a map Here based on leaflet JS and the layers are geojson. I would like to get a table at on another div when I click on each layers. How would I be able to do that? Thanks
2
votes
1answer
144 views

Leaflet: How do you use removeLayer?

This is driving me mad. See the Leaflet tutorial for adding a layer control to your map: L.Icon.Default.imagePath = "Scripts/images"; var mapUrl = ...
2
votes
1answer
51 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
206 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. ...