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

learn more… | top users | synonyms

1
vote
2answers
1k 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
423 views

formatting geojson from postgis data using node.js

I am trying to build a GeoJSON object from a SQL query to some GIS point data in a postgis postgresql database. A snippet of my node.js app.js is below. As it stands I understand building the type ...
4
votes
2answers
1k views

Leaflet drop markers animation

Is it possible to do drop markers on the map like in google maps (https://google-developers.appspot.com/maps/documentation/javascript/examples/marker-animations-iteration) in leaflet
2
votes
1answer
155 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 ...
12
votes
5answers
2k 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
0answers
333 views

Leaflet markers do not open popup on click (with markerclusterer)

I just started using Leaflet and Marker Clusterer to organize the markers. Problem #1: When an unclustered marker is clicked, no popup appears. Problem #2: When a cluster is clicked several times, ...
2
votes
1answer
978 views

How to setup leaflet map to display a WMS layer in ESRI:102012 projection?

I have a WMS server that serves layers in ESRI:102012 projection. http://spatialreference.org/ref/esri/102012/ It accepts GetMap requests with srs=EPSG:102012 parameter. My goal is to display a map ...
1
vote
0answers
231 views

How to access arcgis cache directly using leaflet like openlayers?

I want to access arcgis server cache dircetly by only using leaflet,I wrote some code,but it work badly,could you anyone give me any hints? my code: getTileUrl: function (tilePoint) { var zoom = ...
31
votes
3answers
11k views

Should I use OpenLayers or Leaflet?

I was debating with one of my collegues on OpenLayers v/s Leaflet. I made a point that OpenLayers is much better API if we wish to build a project, where you need direct connectivity to the Geoserver ...
2
votes
2answers
3k 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 ...
3
votes
1answer
2k views

How to add a geoJSON layer to leaflet map?

i am newbie in leaflet & its geojson features... I am trying to test leaflet's functionalities. In fact i have built a map and its layer: var map = new L.map('map', {scrollWheelZoom:true, ...
2
votes
1answer
657 views

LEAFLET - store and retrieve user markers & diagrams from database

I am intending to use leaflet in order to build a "microscope laboratory" for my institute's medical school. I am quite new to javascript, ajax and json technologies so I would like to have some ...
1
vote
1answer
1k views

How to plot multiple markers on a leaflet map?

If I have a object containing lats and longs how can i plot them in leaflet using the marker constructor I tried looping through them for(key in obj){ var val = obj[key]; ...
4
votes
1answer
855 views

What is the difference between Leaflet and Mapbox?

What is the difference between Leaflet and Mapbox, and how are they used together? Like the API and what exactly are they and is Mapbox using Leaflet?
5
votes
1answer
3k views

How to open popup on mouseover in Leaflet? [duplicate]

Possible Duplicate: How to show a popup on mouse-over, not on click? I'm working with Leaflet library. I defined L.layerGroup and add some markers to the group. Can somebody help me with ...
1
vote
1answer
235 views

Does Leaflet always work in decimal degrees?

I'm looking into Leaflet and I'm surprised that it doesn't (seem to) specify coordinates in Web Mercator like other popular APIs, but instead uses decimal degrees. Are all coordinates in Leaflet ...
-1
votes
1answer
346 views

Is it possible to show markers from MySQL database with Javascript?

I'm interested if it's possible to show markers (latit, longit) from MySQL database with Javascript libraries like Leaflet?
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 = ...
7
votes
2answers
5k views

How to show a popup on mouse-over, not on click?

Is it possible in Leaflet that popup opens on mouse-over, not on click? This is working for just one marker at a time, but I need it for a bigger number of markers: marker.on('mouseover', ...
2
votes
1answer
618 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 = ...
4
votes
1answer
2k views

Leaflet marker cluster and popups

I want to develop a map with Leaflet marker cluster. You can see how it looks like here: https://github.com/danzel/Leaflet.markercluster But I need that my markers have popups with more information ...
1
vote
1answer
2k views

Syling Leaflet Maps

Is there anyway to style base maps using Leaflet? I know there are quite a few options for loading different pre-made styles (such as Stamen, Mapbox, etc...), but I am looking for a way to create my ...
9
votes
3answers
2k views

Examples of leaflet interactive mapping applications

I would like to develop a simple mapping application. One where users can digitize lines, polygons and points and attribute the features. The attributes will then be stored in a database for later ...
-2
votes
1answer
133 views

Upgrade Leaflet to 0.4, how to start?

I have an app based on leaflet 0.3.1 and it is time to upgrade to 0.4 !!! Nice ! So, what to do now ! Obviously, our map is absent in the browser, so let's have a look inside our files. Well, i have ...
2
votes
2answers
1k 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
3answers
6k views

How to draw a polyline in Leaflet?

This is my coding I used in Leaflet: var pointA = new L.LatLng(28.635308, 77.22496); var pointB = new L.LatLng(28.984461, 77.70641); var pointList = [pointA, pointB]; var ...
0
votes
0answers
126 views

Leaflet Layers Control - Z-Index? [duplicate]

Possible Duplicate: How to change Leaflet Map panes layering order (z-index)? In the Leaflet Layers Control L.Control.Layers() described here, is there a way to control the z-index (layer ...
3
votes
0answers
284 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 ...
5
votes
1answer
673 views

Working examples of Leaflet/Polymaps with GeoJSON tiles generated from Tilestache using Shapefiles?

I'm looking to create choropleths using GeoJSON tiles generated from ESRI Shapefiles by TileStache(or similar), in either Leaflet or Polymaps. So far reading and drawing GeoJSON from both Leaflet and ...
2
votes
0answers
883 views

Overlaying a mbtiles tile layer produced with tilemill over another layer maintaining transperency

So using leaflet, I'm overlaying my base tile layer as google satellite imagery. I want to overlay another layer (Mbtiles layer) produced with tilemill over this satellite layer. I was successful in ...
2
votes
1answer
3k views

How do I get GeoJSON data from GeoServer into show up on my Leaflet map?

I'm trying to create a simple "Green" map for my city. The idea being that it is a website with a map and layers you can turn on and off. I am serving the data through GeoServer and am using GeoJOSN ...
2
votes
2answers
301 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 ...
7
votes
1answer
1k views

How to configure custom scale in Leaflet?

I have a custom WMS tileset generated using ESRI ArcGIS Server. I have successfully configured an OpenLayers page to display this basemap. The code is as follows: var map = new ...
11
votes
2answers
1k views

Understanding web mapping tools

Before I start, this is going to be a general question but with specific cases. I've been trying to understand GIS tools and applications to achieve the following: Build my own basemap Publish the ...
4
votes
3answers
2k views

MySQL to GeoJSON - Formatting Issue

I'm trying to make a select on a mysql table and then write it out to a geojson file. I'm getting close but there are a few issues. Here's what I have so far: <?php require("dbinfo.php"); // ...
10
votes
5answers
2k views

How do you convert OSM XML to geojson?

I want to take the XML output of a Xapi query and display it using leaflet or polymaps. How can I do that? Is there an easy way to convert XML to geojson
1
vote
1answer
131 views

Pick object by properties (and centre on it)

I have a Leaflet map with a Cloudmade base layer and a single layer of polygons. Each of these polygons has a reference number attached as a property. I would like to select a reference number from a ...
9
votes
3answers
4k views

Does Leaflet JS API provide a Geocoding service?

I am considering replacement of Google Maps with Open Street Maps and the Leaflet JS API. Does the Leaflet JS API provide a Geocoding service?
2
votes
2answers
635 views

Leaflet, defining a specific region for a canvas to draw upon

Using leaflet, you can draw on a given map by adding a Canvas layer. Some instructions are given here, http://leaflet.cloudmade.com/reference.html#tilelayer-canvas var canvasTiles = new ...
4
votes
1answer
3k views

How to change Leaflet Map panes layering order (z-index)?

Leaflet maintains that the Map panes elements contain all layers added to the map. The difference between many of the Map panes is strictly the z-index order of layering. I would like to use a ...
3
votes
1answer
484 views

How to save a Leaflet or OpenLayers map for opening later?

Can a webmap state be saved to a text file or something for restoring later? Like if I set up a map with a particular zoom and choose my layers and draw a polygon or two, can it be saved to a file and ...
6
votes
1answer
627 views

What server and API to use for displaying complex polygons with dynamic symbology?

Background I need to interface a map into an existing website which allows the user to query a database and which currently results in a table listing population statistics per county. For example, ...
6
votes
3answers
7k views

Creating a Bing and Google Tile Layer for Leaflet

I want to use the Leaflet Javascript Library to display both a Google and Bing Tile Layer, though I'm unsure how to construct the url. The documentation shows an example using OSM: var cloudmadeUrl = ...
10
votes
2answers
915 views

How can I make a polyline wrap around the world?

I am using leaflet maps to create a representation of a round-the-world challenge. I would like to add a polyline which heads east from tokyo and then appears west of south america on the map - but ...
14
votes
8answers
9k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
42
votes
8answers
7k views

How to create Vector Polygons at the same amazing speeds GISCloud is able to render them?

EDIT (outlining new bounty added): I have added the largest bounty possible to this question in hope of getting a very detailed answer. Your solution should outline a step-by-step guide utilizing open ...
11
votes
3answers
3k views

Open source alternatives to Google's StreetView engine?

I am looking to create an open source javascript app using either Leaflet or OpenLayers. Is there any way to implement panoramic views (similar to Google's StreetView) into either of these, or any ...
8
votes
1answer
5k views

How to get Leaflet interactivity from Geoserver WMS?

I have geoserver serving shapefiles as a WMS into Leaflet. I'd like to add interativity that shows a popup with WMS attributes in the Leaflet map when the user hovers over or clicks on a WMS feature. ...
11
votes
7answers
6k views

How to convert ArcGIS Server JSON to GeoJSON?

I'm creating a web map using Leaflet, and I want to be able to grab feature layers from our ArcServer. I have successfully been able to retrieve a feature class as JSON, but Esri's JSON objects don't ...