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

learn more… | top users | synonyms

0
votes
2answers
118 views

How to add a floating “crosshairs” icon above leaflet map?

While reading the article about MapBox's map utility to searching for flight MH370, I noticed that they have a stationary "floating" target (or crosshairs) icon that helps users identify the center of ...
3
votes
1answer
292 views

Does Leaflet.js uses WebGL for drawing on HTML5 canvas?

If someone could explain how does the Leaflet.js library draws object (and map layers) on HTML5 canvas? Does it uses WebGL and its GPU accelerated usage of physics and image processing in any way?
0
votes
1answer
44 views

Drop Marker with 3857 projection in leafletjs

Is it possible in leaflet to drop marker with 3857 projection on map? I fond a solution where first translate point to 4326 using proj4js and than drop it on map. var source = new ...
0
votes
0answers
57 views

set map center in leaflet with 3857 lat/lon

I'm trying to set map center with lat/lon of 3857 projection in leaflet. By using lat/lon of projection 4326 its working fine. var map = L.map('map', { crs: L.CRS.EPSG3857 ...
6
votes
2answers
179 views

Color-code a Leaflet polyline based on additional values, e.g. altitude, speed,

I'd like to draw a GPX-track on a Leaflet map. The polyline shouldn't have only one color, but I'd like to show certain values like altitude, speed, heart-rate, temperature, cadence, slope ...
1
vote
0answers
60 views

Leaflet toGeoJSON() keep leaflet_id

When I use the function .toGeoJSON(); is there way to keep the layer leaflet_id?
5
votes
6answers
884 views

3D perspective on maps in Leaflet, CartoDB?

Are there any JS library out there that would render normal, flat maps (like Leaflet) into a perspective map like this one, on the web: Also, anyone seen anything that could turn CartoDB data into ...
3
votes
1answer
624 views

Change default leaflet marker color

I'm using esri-leaflet, and leaflet inherently to add a point feature class (geojson) to a map. What is the best way to add and style the layer? I've see pointToLayer on the leafletjs.com, but don't ...
2
votes
0answers
79 views

Load Leaflet map in canvas element

I am working with leaflet tiles loading tiles to a map div http://jsfiddle.net/tBCd5/ I am now playing with some html5 canvas distortions like below http://jsfiddle.net/UF4PK/ It would be cool to ...
0
votes
1answer
198 views

Strange Leaflet Uncaught TypeError

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 ...
4
votes
0answers
113 views

GeoJSON shape distorted on Leaflet.js spherical mercator WMS map [closed]

I have a map with a simple WMS layer in spherical mercator projection (rendered by a OSM-Mapnik-TileCache server stack, everything is in EPSG:900913 / EPSG:3857). First: I can't understand why, if ...
3
votes
1answer
104 views

Leaflet - Change style on click

I am beginer with Leaflet library and I am facing an issue with a geojson. I have an extern geojson file (points) and I would like to display a circle for each point coordinates and get a bigger ...
1
vote
1answer
67 views

Get bounding box of WMS

Is it possible to request the bounding box of a WMS from GeoServer? In my case I have a WMS that I show with L.TileLayer.WMS in a Leaflet map. I like to center and zoom my map to the WMS.
0
votes
0answers
79 views

Updating Mapbox map to newest API/getting markers to load

I'm new to the Mapbox API (and to Javascript in general), so please bear with me. I am trying to build an interactive map that automatically cycles through map markers as the user scrolls through ...
2
votes
1answer
115 views

Cache geodjango query with bounding box filter

Im using geodjango (postgis) to retrieve points contained inside a bounding box (made by leafletjs), it works so nice, but now I want to cache this query. A tipical query is one like this: ...
1
vote
0answers
73 views

four color theorem for QGIS 2.0 or Leaflet?

I recently looked at some other posts relating to this topic but as far as I can tell there is currently not a working plugin or script for QGIS 2.0 to achieve a four color theorem for styling polygon ...
0
votes
1answer
144 views

How does Leaflet layer ordering work with CartoDB layers?

All, I'm trying to figure out how Leaflet layer ordering works when you have layers coming from CartoDB. I have a map with 1 polygon layer (cartodb), 3 point layers (cartodb), 1 basemap layer ...
2
votes
1answer
268 views

OpenLayers3 vs Leaflet for styling multifeature geojson

I'm experimenting with various options for displaying geographic information to the public in html format. The ultimate aim is to build an online application where anyone can add the route they cycle ...
1
vote
1answer
109 views

Reprojecting in postGIS from 900913 to 4326. Wrong coordinates

I'm working with postGIS 2.1 I have a table called 'xacementos' created with the srid: 900913. I took the points coordinates from google maps and I want to convert them to SRID:4326 to show the points ...
2
votes
1answer
360 views

Make sidebar div active on Marker click (and vice versa)?

What's the best way to change an element to active when you click on a marker. For example, when you click on a marker on a Leaflet map, how to make it so the sidebar element that's related to it ...
0
votes
0answers
171 views

Leaflet - Tiles stopped loading. Can't figure out why

Suddenly my map stopped loading tiles and I went on the leaflet site and downloaded the latest version of everything. ...still I could only make London visible with its latitude and longitude. I have ...
3
votes
1answer
121 views

How to create leaflet legend for points

I have points like this in a leaflet map. The points come originally from a GeoJSON file and I used L.circleMarker to convert them to circles. How can I create a legend for these points? Based on ...
-1
votes
1answer
101 views

how to use MBTiles4J

I got a MBTiles Server written in Java here. https://github.com/jtreml/mbtiles4j I am new to java. Can anybody briefly discuss how it works. I want to create an eclipse project with this. Specially ...
0
votes
0answers
53 views

How can I create Albers projection of Russia map?

I need a conic tranformation of map, so this code var map = L.map('map', { crs: new L.CRS.proj4js('EPSG:4326', '+proj=aea +lat_1=52 +lat_2=64 +lat_0=0 +lon_0=105 +x_0=18500000 +y_0=0 +ellps=krass ...
2
votes
2answers
151 views

where to host private cartodb/leaflet web app

I am looking for opinions on where to host my cartodb/leaflet map site. It needs to be private with authorized users and have a document management system. So, I was thinking sharepoint online 2013 so ...
4
votes
1answer
704 views

Trigger a click event on a leaflet map?

Is it possible to make a click event occur at a particular lat/lon on a leaflet map? I would like to make a popup appear that is associated with a point at a particular location. I have tried several ...
0
votes
0answers
75 views

OpenLayers WMS to Leaflet with EPSG:2170 projection

This is the original code for OpenLayers 2 var res = [ 1000.0 / 4.0, 1000.0 / 8.0, 1000.0 / 16.0, 1000.0 / 32.0, 1000.0 / 64.0, ...
0
votes
0answers
48 views

How do I only use a subset of features from Arcgis feature services in leaflet?

Is there a possibility to only use a selection of features based on an attribute from an arcgis feature service in leaflet? As you can set a query to a service, could this be done easily in leaflet ...
2
votes
2answers
89 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 ...
0
votes
0answers
45 views

Leaflet SVG layer is obscuring the underlying GeoJSON interactivity

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in-place within the leaflet-overlay-pane? (For example, how ...
0
votes
1answer
126 views

Create Tiles for a raster(georeferenced) to use in leaflet

I have raster, with each pixel containing some data. What i want is to split a large image with each pixel's color is determined by its value, to show on leaflet layer.How to go about this ? raster ...
0
votes
1answer
123 views

Display Leaflet Markers with UTM coordinates?

is it possible to display markers with UTM coordinates (zone 32) with leaflet and OSM? How can I do this? If I use UTM Coordinates like latlng, the position is totally wrong: ...
2
votes
0answers
385 views

How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in place in the leaflet-overlay-pane? (For example, how could ...
1
vote
1answer
460 views

Which plugin can draw topoJson right within Leaflet without conversion?

I already have asked how to reduce file size and increase performance for publishing spatial data on the web using Leaflet, here. A conversion to TopoJSON has reduced the file size by approximately ...
0
votes
1answer
55 views

I've installed OpenGeo Suite, how do I use it with Leaflet?

I've just finished installing OpenGeo Suite on my VM Ubuntu web server. I'd like to be able to use Leaflet from leafletjs.com to view my maps with on my mobile devices. I'm supposed to create an ...
1
vote
2answers
723 views

how does one reset map.fitbounds (zoomtofeature()) to the original zoom?

I have a lovely map setup using Leaflet with MapBox tiles (only). It is a United States map with polygons for each state with an onclick event to zoomToFeature. The basic zoomToFeature() function ...
1
vote
1answer
393 views

Unable to get Mapbox leaflet-omnivore to load markers from .csv

I'm using the Mapbox.js API to build a really simple web map using a .csv file to place markers with tooltips. I'm trying to use the suggested leaflet-omnivore library to easily parse the csv and ...
1
vote
1answer
254 views

Leaflet JS calling animatedMarker.stop() from event listener

I'm using the animated marker plug-in for Leaflet JS and would like to stop the marker from animating when it reaches a certain lat lon position. Currently I'm using Leaflet's 'move' event listener ...
0
votes
1answer
64 views

How does an underscore change leaflet layer behavior?

I'm not sure how the underscore affect leaflet layers. I've seen it used to bind a popup to a sidebar click. How does "map._layers" work? I can't find anything in the documentation about using an ...
2
votes
1answer
140 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
0
votes
0answers
67 views

Discrepancy Between Polygon and ImageOverlay

I have a map in projection EPSG:26911 that I defined this way (using the proj4leaflet plugin): var crs = new L.Proj.CRS("EPSG:26911", "+proj=utm +zone=11 +ellps=GRS80 +datum=NAD83 +units=m ...
0
votes
3answers
221 views

Leaflet.js displaying incomplete base map

I am working on a tile server with a leaflet.js UI. I have successfully created the tiles for my base map and the tiles for the overlay. The result can be seen here (zoom in further to see overlay). ...
0
votes
0answers
91 views

Using zip file in html

I have my map files vdcar.js (about 27.79 MB) and vdcar.js.zip (about 9.79 MB) in same folder in server. Also have TestPopden.html (http://ngiip.gov.np/THEMATIC_MAPS/TestPopden.html) and .htaccess ...
0
votes
1answer
118 views

Why it takes long time to open a map page [closed]

While opening for the first time it takes more than 30 minutes to open this map page. What might be the reasons. Any suggestions from experienced professionals? The link is ...
6
votes
3answers
181 views

How to generate image tiles from custom geo data for use with Leaflet

Migrating a webapp from Google Maps API V3 to OSM + Leaflet, which displays custom data that consists of lots of lines and points, on a background map. When this custom data is drawn by Leaflet on ...
0
votes
1answer
204 views

leaflet - The marker and center map are not in the right place

I'm starting use the Leaflet. I put a marker to test but neither the marker nor the center are in the right local I set. example: I put the marker inside a stadium and it appear outside stadium. ...
0
votes
0answers
36 views

What are some ways to put points on a map and information about those points in a sidebar?

I'm trying to figure out the best way to have a sidebar that will have information about points on a map (like you see in something like yelp). I can get the points on the map but I'm struggling to ...
2
votes
0answers
108 views

How to add an offset to a GeoJSON layer in Leaflet?

Using the example GeoJSON tutorial code at leafletjs.com. Change the myLines variable so that the two lines overlap, but run in opposite directions as follows: var myLines = [{ "type": ...
1
vote
1answer
136 views

Add EPSG:3857 geometries to map using Leaflet

Right now Leaflet can only add geometries with latitude and longitude values onto the map. If we have a EPSG:3857 point, whose x=-11819829 and y=4200860, how can I add it onto the map? If this point ...
0
votes
0answers
155 views

Progress-bar not appearing on Leaflet-MarkerCluster

I am having problems with the progress-bar of leaflet markercluster. I am using it in a geodjango application which uses the django-leaflet app to handle the leaflet requirements. Everything works but ...