Tagged Questions

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

learn more… | top users | synonyms

0
votes
0answers
109 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
66 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
159 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
77 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
184 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 ...
1
vote
1answer
197 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
656 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
860 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 ...
1
vote
2answers
110 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
2k 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
567 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
374 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
88 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
213 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
96 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
310 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
103 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
144 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
291 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
396 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
41 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
163 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
234 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
205 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 ...
2
votes
3answers
113 views

Start-Marker from geojson polyline

i have a map with some walking- and bike-routes and popups with a few details and a picture. Now i want to set a marker on the first vertex of a geojson polyline, but i cant find out how. Btw. i´m ...
2
votes
1answer
460 views

Viewing map tiles from Maperitive in leaflet or openlayers

I generated tiles in Maperative. Created following html file: <html> <head> <meta charset="utf-8" /> <link rel="stylesheet" href="leaflet/leaflet.css" /> ...
0
votes
0answers
42 views

How to realize two overlaying layers? One with Popups, the other one with Info-div!

I'm trying to display two overlaying layers (geojson). Layer1 should give me information by hovering over it (works fine based on the Leaflet Choropleth Map Example. Layer2 is situated within Layer1 ...
1
vote
0answers
22 views

GeoServer Date ftl showing time stamp rather than just the date

I had an issue with Geoserver showing my postgresql data in the US (MDY) format rather than the UK / European format (DMY). I fixed this by removing the comment #, and setting the language, to en_GB. ...
1
vote
1answer
324 views

Leaflet setView with non lat/long CRS

Is it possible to use setView when using an alternative CRS? var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method ...
0
votes
0answers
97 views

How to add Esri legends for basemap within Leaflet JS?

I have a map with the Esri REST population density basemap. I also have 5 geoJSON layers with a legend. What is a method to display the Esri legend when my geoJSON layers are turned off and my ...
0
votes
2answers
407 views

Is there a good free Flat style map tile available?

I'm building a website in the style of Flat Design, and hoping to find a map tile that complements the design and can be used with Leafletjs.
9
votes
1answer
194 views

Mercator bias plot in Leaflet

I was inspired by this wikipedia image from the mercator projections page to hack around with leaflet. The idea was to interactively have your cursor move a continent and that it would be corrected ...
4
votes
1answer
82 views

Why do these points send me to the middle of the ocean or middle of nowhere? [duplicate]

I've been beating my head against the wall trying to map some points using Leaflet + OSM. I put in some sample points (near Bellingham, WA, USA). I've checked the JSON with JSfiddle and ...
2
votes
1answer
248 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 ...
3
votes
2answers
98 views

How to display information in a div outside the map?

I tried a bit around and created a simple map with two polygons(most of the code I got from the Interactive Choropleth Map Tutorial). I added a "L.control()" to show information about the polygons in ...
3
votes
1answer
270 views

leaflet choropleth map using dynamic value

I am doing a choropleth map using leaflet and JSON data. I got a clean tutorial in leaflet site. In that tutorial the used us-states.js JSON file where the choropleth was based on the ...
3
votes
1answer
2k views

How to highlight features on user click in Leaflet?

I'm new to leaflet & javascript. I made local tiles using maperitive, I can draw Polygons, Polyline & Points using GeoJson over the tiles using leaflet, I can serve the both (tiles & ...
5
votes
1answer
118 views

toggling a list of paths in Leaflet

I drew a bus map of San Juan, Puerto Rico in leaflet.js. It's on dropbox. Using the layers control I let users toggle the bus routes they want to see. Unfortunately, the list of 45 or so bus ...
1
vote
1answer
1k views

Add simple image layers to MapBox / Leaflet?

Is there an easy way to add simple image layers (with no, or very limited, GIS data) to Mapbox and/or Leaflet? Google maps seems to have the ability to add custom layers, simply by attaching the SW ...
1
vote
2answers
1k views

How I can load tileLayer in Leaflet framework using local tiles?

I'm using file:///C:/path/tiles/{z}/{x}/{y}.png like url of tileLayer but it doesn't work and no error is shown. var layer = new L.tileLayer("file:///C:/OSM/tiles/{z}/{x}/{y}.png", { minZoom: ...
0
votes
0answers
45 views

Create canvas layer matching wms layer

I would like to get a canvas layer matching exactly my wms layer with leaflet. Is that possible?
2
votes
0answers
102 views

QGIS 2.0 How to copy the color styling to a color column in a layer's attribute table

I have a polygon layer in QGIS that I have applied a random color style to each polygon. Under Layer Properties -> Style I selected a Categorized style and then generated a random color ramp. I added ...
0
votes
0answers
102 views

Heatmap processed on the whole layer / dataset

How can I process the geoserver heatmap on my whole database rather than on the displayed part of it? What I want is to keep the same color for each place, everytime. Here is an illustration of what ...
0
votes
1answer
125 views

Geoserver heatmap in meters rather than pixels

Is it possible to get the radius' density kernel of the heatmap in meters rather than in pixels? http://suite.opengeo.org/opengeo-docs/cartography/rt/heatmap.html If not, is there other alternatives ...
0
votes
2answers
908 views

Problem loading WMS layer from external server in Leaflet

I'm trying to use the WMS service documented here in a leaflet map. The documentation shows an example for openlayers: var wms = new OpenLayers.Layer.WMS( "Population Density", ...
2
votes
1answer
151 views

Leaflet.js and CartoDB.js event conflict

Little problem here. I’ve got a layer from a CartoDB viz that I’m listening to the featureclick event. When a feature is clicked I highlight it by applying cartoCss. However, I want to unhighlight it ...
0
votes
1answer
311 views

problem using proj4js and Leaflet to transform coordinates

Sorry, this question is really simple (my simple brain must be doing something stupid)... I'm trying to use proj4js with Leaflet to convert a mouse click event from WGS84 coordinates into British ...
0
votes
1answer
280 views

Mapbox markerLayer from GeoJSON with prompt as input not working

I am trying to display a pin on a map. It works fine if I code the GeoJSON data into the script of my file. If I try to insert the GeoJSON data via a user prompt, it doesn't work. The variable must be ...
3
votes
2answers
128 views

Convert data to another Coordinate Reference System

Assuming I've a point like this : POINT (751318 9760879) This point is in EPSG:27700 coordinate reference system. How do I convert the point to display in a map with EPSG3857 coordinate ...
2
votes
3answers
432 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?