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

learn more… | top users | synonyms

3
votes
1answer
254 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
109 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 ...
0
votes
1answer
868 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
936 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
39 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
96 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
92 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
114 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
813 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
139 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
266 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
263 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
125 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
395 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?
2
votes
1answer
424 views

How can I load stricly tiles within the current viewport in Leaflet.js?

I have tiles that are not available for the whole map. How can I stop Leaflet.js/Mapbox.js from making requests to these tiles? There are dozens of 404's that I'd really like to get rid of. Thank ...
0
votes
0answers
65 views

XMLHttpRequests clogging/pending in Leaflet.js

If I have a lot of active layers and eg. zooom in and out, dozens of tile xmlhttprequests are sent. This causes a problem in most browsers, clogging it so to speak, and leaving the map blank and ...
2
votes
1answer
395 views

Leaflet.geojson webpage performance out of hand, how to convert to .png?

I exported some countries as a single .geojson file. The file includes every country's vertices and coordinates, as that's what a .geojson is ─ a vector file. Thing is, there are about 20 countries ...
2
votes
1answer
60 views

Why aren't my basemap tiles showing up via ArcGIS Server

I have a leaflet js script referencing the ArcGIS server imagery api. The code worked fine up until about two days ago. Now when I click on the layer there's a gray background. I am using my local ...
0
votes
1answer
110 views

How can I extend L.mapbox.legendControl?

I'm trying to override legendControl.onAdd, but I can't seem to do it early enough. I can override the other functions, since they're fired after map init, but I can't seem to change the prototype? ...
0
votes
1answer
59 views

How to call Leaflet FullScreen plug-in from code

I'm currently using Leaflet along with leaflet.fullscreen to provide a full screen map. I've got it working nicely with the button but I can't work out how to "call" the function manually from my ...
1
vote
1answer
296 views

How to improve speed of rendering polygons from Postgis in Leaflet?

I want to improve speed of rendering polygons in my Leaflet map. Polygons are stored in Postgis, and are rendered with select query with bbox. I wonder can I cache somehow those polygons? I read ...
1
vote
1answer
220 views

SVG control not visible on top of Leaflet.js

I'm using Leaflet 0.7.1 and want to draw a radial menu (like openstreetmap's iD editor) on top using d3. Some examples I found use Leaflet's overlayPane to append the svg element to: var ...
1
vote
1answer
82 views

Hot could I generate a CRS field inside the GeoJSON object created by Leaflet layer.toGeoJSON?

I'm using Leaflet to transform some drawn polygons to GeoJSON and send them to a backend. But the GeoJSON objects generated by layer.toGeoJSON are like this: { "type":"Feature", "properties":{}, ...
0
votes
0answers
496 views

How to populate popup content when clicked on polygon in Leaflet?

When user click on polygon, popup opens with content from my-query.php. The problem is that php query is loaded when map loads, and I want that my-query.php loads when user click on some polygon, so ...
1
vote
1answer
60 views

Is there a way to visualize TIN surfaces for web-mapping purposes?

I have created a TIN data set of electricity consumption. It is visually appealing, and often times TINS help the map reader understand geographical relationships better. Are there methods to ...
1
vote
1answer
957 views

Leaflet draggable Marker

I have setup a draggable marker on my map with Leaflet API. Its working fine. But the problem is when I am trying to drag it to the border area the map is not moving. I want a panning map with Marker ...
0
votes
0answers
260 views

Leaflet Map Dropdown

I am attempting to create a simple basemap selector to use in a leaflet map to assist in selecting a basemap of interest. I've created a new Select control that works great in a computer browser but ...
3
votes
1answer
182 views

How can I use Leaflet with esri-leaflet and ArcGIS Online services

I've used public ArcGIS Online services plenty of times in ESRI JS web apps and I imagine that using them as layers in Leaflet is pretty much the same. The one problem I can see is how would one ...
0
votes
0answers
125 views

How to correctly use multipolyline with leaflet

I'm trying to represent one polyline with leaflet, then copy it in a multi polyline, empty the polyline, and fill it again with new data. I currently use something like: l = ...
2
votes
1answer
311 views

Options for getting data from SQL Server into Leaflet app?

I have polygon data in SQL Server 2012 that I need to get onto a Leaflet application - we're not talking thousands of polygons, but simplified U.S. counties where only one state will be displayed at a ...
1
vote
1answer
1k views

Using Google Tiles on LeaftLet

I would like to use the Google tiles on LeafLet (RoadMap, Satellite,...). I've tried this https://github.com/shramov/leaflet-plugins and it works fine, but I'm worried about the possible legal ...
0
votes
1answer
933 views

Leaflet GeoJSON features not showing up in map

New to GeoServer and Leaflet...loving it so far, but I am weak in JavaScript. I have just built a simple web page that should load points from a GeoServer WFS service using GeoJson. However, even ...
0
votes
1answer
145 views

Chorpleth Data visualization in Mapbox Leaflet API

I am using Mapbox Leaflet API. I have followed the following tutorial of Mapbox. https://www.mapbox.com/mapbox.js/ (Please change to Data visualization Tab) Onclick its zooming on state and hover ...
2
votes
0answers
142 views

Leaflet wms offset on zoom out

I have Leaflet map with base layer (epsg4326) and wms layer of gps point (also epsg4326). I've noticed when I zoom out , the gps point offset to the left. Any idea why it happens ? Here you can see ...
0
votes
1answer
317 views

Leaflet geoserver wms doesn't show on google map base layer

I have a site running Openlayers (base layer google and overlay wms in epsg4326 from geoserver). The site works fine. I've decided to try doing the same with leaflet , and from some reason I can't ...
1
vote
1answer
90 views

Leaflet and census block data: not displaying

I am new to leaflet and am trying to load a geojson file showing census blocks and associated information for a city in CA. It is a small city and not too many census blocks. I cannot get the popup ...
0
votes
0answers
103 views

Help needed to get PINs clustered from the switch2osm.org tutorial (GeoJson)

I want to use basicly two PlugIn-Codes: for dragging with reload <http://switch2osm.org/using-tiles/getting-started-with-leaflet/> and for clustering, I wish to involve features from ...
2
votes
1answer
140 views

Super large scale maps with Leaflet, how?

I have a map/architectural drawing of two floors of a huge building with a lot of rooms. Now I'd like to make an interactive slippy map using preferably Leaflet showing all the rooms and use ...
0
votes
1answer
734 views

Leaflet Layergroup - hide one layergroup on first page render

Using Leaflet.js, I have two LayerGroups: var LayerSeventeen = new L.LayerGroup(); var LayerEighteen = new L.LayerGroup(); And their respective markers bound to those layersGroups: var ...
3
votes
3answers
295 views

Leaflet and ArcGIS Geoprocessing Service

Does anyone know of an example of a leaflet map with a geoprocessing service? Is it possible? What would the code look like? I know ESRI Leaflet allows feature layers and map layers but I can't find ...
2
votes
1answer
425 views

How do I set the fillcolor of polygons in Leaflet.js dynamically?

I'm using the interactive chloropath example for leaflet.js I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked. Upon ...
0
votes
2answers
94 views

Need some hints for a draggable POI-map (Leaflet)

I try to make such kind of map: http://www.plotbrowser.com/search.cgi but first, I can´t see, where they saved the coordinates and the text. If you look to the sources, there are no coordinates or ...
1
vote
0answers
276 views

Leaflet Event Craziness: jQuery click events don't propagate to L.DomEvents

I noticed that calling .click() on jQuery selected DOM elements in Leaflet ( such as anchor icons ) will not do anything -- the click event isn't propagated to the events created with L.DomEvents. For ...
0
votes
0answers
65 views

Filter down geolocation using osm, google, or nokia js plugins

I have a simple map using leaflet and the osm geolocation plugin. Everything works fine, however I have not found alot of information on how to filter the search to say a city/ county. This would be ...
6
votes
3answers
688 views

Advantages of WFS over GeoJSON/KML?

I'm planning to create an online map with openlayers (2 or 3) or leaflet. I have to show some points/markers (~30.000), polygons (~500) and lines on top of an OSM map in several layers. Those points ...
3
votes
2answers
82 views

Mixing coodinate systems

I'm planning to create an online map with openlayers (2 or 3) or leaflet. I have to show some points/markers (~30.000), polygons (~500) and lines in an area of ~10x10 kilometers in several layers. ...
1
vote
1answer
84 views

How can I make sure that tiles display properly when you first go to the page?

This page is not showing my map tiles properly when you first go to the page. http://bear.hol.low.li/Pocket_Docent/map.htm If I resize the window it centers and distributes the tiles properly. How ...
6
votes
1answer
656 views

Using Tilestache and Leaflet To Display Rasters In Native Projection

I have a collection of old Idaho state highway maps in GeoTiff format. The projection that these maps have been georeferenced in is a transverse mercator projection, called IDTM83 (Idaho Transverse ...
1
vote
1answer
2k views

Go to the URL when clicked on Leaflet marker

I want to implement marker click event so when user click on marker it goes to url. Url is written inside an array (a[3]). However, this is my code which doesn't work, it always goes to the link of ...