Questions tagged [leaflet]
An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps
3,430
questions
9
votes
1answer
15k 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
1answer
7k 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
2answers
612 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
2answers
9k 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
2answers
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
2answers
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 ...
25
votes
5answers
84k 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
0answers
701 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
0answers
691 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
1answer
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
0answers
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
1answer
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
3answers
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
1answer
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
2answers
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
3answers
6k 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
7answers
18k 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
160 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 ...
18
votes
3answers
22k 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
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....
19
votes
1answer
52k 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
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
1answer
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
3answers
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
2answers
5k 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
6answers
20k 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 ...
59
votes
7answers
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
4answers
8k 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 ...
12
votes
3answers
14k 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
14answers
39k 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 ...