Questions tagged [leaflet]
An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps
3,799
questions
3
votes
2
answers
4k
views
Rendering problems for some polygons in a Leaflet map with a GeoJSON tile provider
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 ...
5
votes
1
answer
3k
views
Creating proper 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 ...
3
votes
2
answers
9k
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
1
answer
238
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 ...
42
votes
6
answers
34k
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
0
answers
1k
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
1
answer
2k
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
0
answers
462
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 = ...
113
votes
8
answers
90k
views
Choosing OpenLayers or Leaflet? [closed]
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
2
answers
11k
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 ...
5
votes
1
answer
6k
views
Adding GeoJSON layer Leaflet map?
I am new to leaflet & its geojson features.
I am trying to test leaflet's functionalities and have built a map and its layer:
var map = new L.map('map', {scrollWheelZoom:true, doubleClickZoom:...
2
votes
1
answer
3k
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 ...
4
votes
2
answers
8k
views
Plotting multiple markers on 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];
var ...
11
votes
1
answer
4k
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?
6
votes
1
answer
12k
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
1
answer
750
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 ...
0
votes
1
answer
2k
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
1
answer
5k
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 = ...
48
votes
5
answers
148k
views
Showing popup on mouse-over, not on click using Leaflet?
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', function(e)...
10
votes
1
answer
16k
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 = ...
5
votes
1
answer
8k
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
2
answers
635
views
What are some good examples of geospatial UI's [closed]
I am interested in understanding and applying practical geo-spatial examples for some of the transportation data that I have. I have several geocodes that I will pull from the database, and display in ...
2
votes
2
answers
12k
views
Styling 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 ...
13
votes
2
answers
6k
views
Examples of leaflet interactive mapping applications [closed]
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 ...
4
votes
2
answers
6k
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 ...
28
votes
5
answers
101k
views
Drawing 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 ...
1
vote
0
answers
858
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 order) ...
3
votes
0
answers
714
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 ...
6
votes
1
answer
1k
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 ...
3
votes
0
answers
2k
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 ...
4
votes
1
answer
13k
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 ...
4
votes
3
answers
2k
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 ...
8
votes
1
answer
3k
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 OpenLayers.Map('map',...
17
votes
2
answers
3k
views
Understanding web mapping tools [duplicate]
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 ...
5
votes
3
answers
7k
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");
// ...
17
votes
7
answers
21k
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
1
answer
162
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 ...
19
votes
3
answers
24k
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
2
answers
2k
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 L.TileLayer....
20
votes
1
answer
62k
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
1
answer
1k
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
1
answer
1k
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, ...
8
votes
3
answers
17k
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 = ...
16
votes
2
answers
6k
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 ...
19
votes
6
answers
21k
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 ...
60
votes
7
answers
13k
views
Creating Vector Polygons with rendering performance like GISCloud?
I have been looking for a solid solution which would allow me to create a web map and overlay vector polygons without taking forever to load such data with the goal of allowing me to make each polygon ...
15
votes
4
answers
10k
views
Seeking Open Source alternatives to Google's StreetView engine? [closed]
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 ...
13
votes
3
answers
15k
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.
...
49
votes
14
answers
43k
views
Converting 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 ...