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

learn more… | top users | synonyms

2
votes
1answer
78 views

How does one use leaflet layergroups with CartoDB layers?

I'm trying to use leaflet layergroups with a cartodb layer, ala: http://leafletjs.com/reference.html#layergroup but haven't been able to successfully do it. This is what I have so far: var map = ...
0
votes
0answers
14 views

How to load an external WFS (GML output format) in a Leaflet map?

I need to build a Leaflet map loading data from this external WFS service http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Numeri_Civici_2012.map&service=wfs&request=getCapabilities with ...
0
votes
0answers
4 views

Cartogram plugin for leaflet or OSM

Does anyone know if there is a plugin to make cartograms for leaflet ? I have sets of geotagged Twitter datas and I'd like to distord the map according to the density of tweets of every area of the ...
1
vote
0answers
5 views

Changing list-item css class using ng-class when mousing over Leaflet Map Markers

I've got a doozy of an ng-class problem. So I have an app with a map/markers on the right and a list-item menu on the left with info about the markers (like Yelp or Foursquare). With some of my ...
1
vote
0answers
19 views

Leaflet + GeoServer + British National Grid

I have followed along some examples and was able to display BNG 27700 data nicely on the map, however now I want to perform getFeatureInfo function on click. Again the code I used is as below: var ...
0
votes
1answer
23 views

Draw Complex shapes

Is it possible to draw complex shapes (polygons) like below image, combining lines and arcs. It is more like a Land Survey plan. So I have coordinates of each point and in case of arc - Radius, Chord, ...
0
votes
0answers
18 views

How to create dynamic legend for multiply layers with leaflet.js?

I want to create multiple choropleth maps which displays different statistical data with leaflet.js. So it would be nice to show different legends for each map. I create such legends for two layers ...
0
votes
0answers
11 views

Serving data based on tiles

I am new to mapping and displaying data on maps. I was trying to display markers on a map where each marker represents a point of interest on my map. Using leaflet it is quite straight forward to add ...
1
vote
0answers
11 views

Displaying a box with text on a leaflet map

Is there a way to display a label or textbox on a specific geo-place on a map produced by leaflet.js.? I know about the Marker- and Polygon Method But I can't find a way to put text in the polygon. I ...
1
vote
1answer
90 views

How do I import a PNG as a TileMill layer?

I want to use the NASA "Blue Marble" images as the basis of a map tile set for a Leaflet.js map. It seems like using TileMill is the easiest way of building up my tiles, and opens a lot of options ...
1
vote
1answer
162 views

passing geocode results object to another file

I'm using a geocoding plugin (Leafet.GeoSearch) on a map and I'd like the results, being the LatLng point coordinates, etc available as a parameter for GeoServer cql filtered calls. It doesn't seem ...
1
vote
0answers
13 views

How to add multiple cartodb layers in viz.json to a leaflet layer control

I have create a visualisation in cartodb with 4 layers. The resulting viz.json is added to a leaflet map as follows: cartodb.createLayer(cartomap, [url], {https:true}) ...
1
vote
0answers
13 views

geoserver wrong tile generation on leaflet

I am creating world map with bathymetry using Geoserver 2.5.1 and leaflet. It works perfactly upto certain zoom level. but after that i get few tiles drawn in wrong color as shows in images. Does ...
0
votes
1answer
151 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 ...
1
vote
1answer
18 views

How to add labels parallel to lines, polylines or multilines using Leaflet?

I want to add road name parellel to its line or if the line is curved, then the label should also be curved. How to add these name labels using leaflet? example image
0
votes
0answers
8 views

geojson object with different representations and label/popoup conten

I have a quite complex geojson in terms of vertexes. It holds all the information which is needed in the webmap. it serves as the input for many layers like this (example for two): var represenation1 ...
0
votes
2answers
35 views

How to change Leaflet marker color on mouseover?

I'm having a hard time figuring out why the Leaflet method setstyle will change the color of a polygon but not the color of my markers. Polygon works fine: But the markers won't change colors: ...
1
vote
0answers
27 views

How to go about creating a custom tool/adding special functionality for a web app

In my soon to be developed web app, I will have an image service and also a feature service that is essentially an index to the image service, with all kinds of attributes. I would like for the user ...
0
votes
0answers
22 views

How to hide overlays in Leaflet layerControl if geojson var not found?

i would like to perform a specific task: i have a set of geojson layers, loading features from local files. i have the layercontrol on the map showing available layers to show/hide now, regarding ...
0
votes
2answers
711 views

How do I modify features during runtime, in a GeoJSON feature group on Leaflet?

I have added some GeoJSON to my Leaflet powered map as below. (Altered version) var array_of_layers = L.layerGroup([]); var styleholder = []; var belgium_style = {color: "#d3e46f"}; var bosnia_style ...
1
vote
2answers
1k views

How to project pixel coordinates in leaflet?

I am trying to create a map based on an image which is 16384x16384 px, but I would also like to add markers at specific locations using pixel coordinates of this given image. I created a tile layer, ...
6
votes
3answers
122 views

How to use Leaflet to efficiently show parts of a massive dataset?

I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is. There is some dataset of thousands of items. We want to show a map to the user, with the ...
3
votes
3answers
81 views

Offline Map Service with Mapnik and Leaflet

I'm relatively new to GIS, so I hope my asking doesn't appear to be ignorant in any way. I currently work on an offline map service solution for usage in areas without internet connection. For that ...
1
vote
1answer
213 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
17 views

How to use different popup styles in the same leaflet web map for different dynamic map layers

I am very new to javascript, CSS and HTML. I have been playing around with leaflet and have been trying to figure out a way to customize popups for different features in my map. Is there a way to do ...
1
vote
0answers
32 views

How do I use Proj4Leaflet projections correctly?

I'm loading data layers from a WMS server into a Leaflet map, and I need to give the user a choice of projections. For the WMS server requests, I just need to change the CRS parameter to a different ...
1
vote
1answer
288 views

proj.4 definition for Moscow GCS_Bessel_1841 to WGS84 convertion

I'm developing an app which should show a map using Leaflet framework but i have no luck as the coordinate system on the map server differs from the one used by Leaflet. As a map server i use ...
11
votes
9answers
8k views

How to convert 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 ...
3
votes
2answers
130 views

Leaflet geoJson in front of markers in a FeatureGroup

I am loading some markers and json data to a leaflet map. I need to get my json in front of the markers. I have tried placing the markers and json in seperate FeatureGroups and then tried ...
2
votes
0answers
11 views

How do I change polygon opacity using a esri WFS in leaflet?

Note...Solved and here for anyone having this problem...damn simple problem, I had not used a higher case character for fillcolor and fillopacity....they should be fillColor and fillOpacity , it ...
4
votes
0answers
20 views

Does leaflet.js offer an gutter option just like Openlayers

Currently we are switching from Openlayers to leaflet.js and there is a problem using a WMS layer with leaflet. The WMS being used is Deegree. When a layer is visualised within leaflet there are ...
4
votes
1answer
132 views

Moving a shape around the earth while maintaining the proper projection

What is the transformation needed to be taken on every data point of a shape to rotate that shape around the globe. I'm trying to figure out the math behind this kind of transformation so I can ...
2
votes
3answers
2k views

Getting WFS data from Geoserver into leaflet

I'm trying to use a ajax call to load WFS data from geoserver into a GeoJson layer in leaflet. When I do the following message in the console: XMLHttpRequest cannot load ...
1
vote
2answers
475 views

Leaflet: Container coordinates vs Layer coordinates?

What is the difference between map container coordinates and layer coordinates? From what I gathered, the map container coordinates are always relative to the map viewport, and while layer ...
3
votes
3answers
695 views

Display GeoJSON layer on top a SVG image instead of a map.

I'm very new to GIS, so hope this is the correct place to ask. Not sure if this will even be possible. This is what I want to achieve: In short, I want to display a set of polygons, lines etc. in a ...
1
vote
1answer
33 views

How can I make Leaflet tiles appear in a page? [closed]

I am having trouble with leaflet working, but not displaying any of the background tiles in the page. This one is using the leaflet-rails gem in a Rails app. This is just in an html sample page: ...
5
votes
1answer
270 views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
0
votes
1answer
215 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 ...
0
votes
1answer
288 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
0answers
30 views

Leaflet: How to enable pan & zoom while GeoJSON still rendering?

I've overlaid a huge GeoJSON geometry on top of my Leaflet map, covering about 20 countries' borderlines (about 1,5 million vertices) using "L.geoJson". Each time I zoom in/out, the computer has to ...
2
votes
1answer
22 views

Make Leaflet Map Background Transparent

How can i make the background of the leaflet map transparent. I see opacity controls from the layers, but not the map background. Should the be changed just with plain CSS? Thanks
3
votes
2answers
44 views

Disable panning/dragging on leaflet map for div within map

This may be a bit trivial, but does anyone know how to suppress panning when you click and drag over top of a div box embedded within the map itself? Not sure if this question has been asked in ...
3
votes
1answer
41 views

Day and night zone layer for Leaflet

I'm working with Leaflet and I'd like to show the day and night zones adding a dynamic layer to my map. I was thinking to add a static layer with some transparency and make it move every x minutes but ...
2
votes
1answer
76 views

Leaflet snap circle draw to marker

I am looking for ideas/libraries that enable snapping when I create a circle with leaflet draw. There is the libaray Leaflet snap, that enables snapping of draggable markers to polylines and other ...
2
votes
1answer
31 views

Viewing map tiles generated from Maperitive in leaflet or openlayers

for few days i have been working on developing my own osm tile server. I tried it on linux as well as on windows, no complete success till now. I Have to make tile server on both windows and linux. ...
2
votes
1answer
157 views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
1
vote
1answer
20 views

layer priority over basemap

Hello I was trying to but together a quick and dirty bing/osm map using leaflet and leaflet plugin. My problem comes in when adding a layer from cartodb.The points do not show and I am not getting ...
9
votes
1answer
164 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 ...
1
vote
0answers
25 views

Remove TileStache cache for a single feature

In a large parcel map, features are edited and need to be re-styled. I want to keep as much of the cache as possible, but invalidate the cache for features that are edited when the features are saved. ...
0
votes
1answer
54 views

Optimum set up for large data sets such as mobile service coverage maps [closed]

When serving up large data sets such as mobile coverage maps (custom tile) mashed up with MapQuest maps and MapQuest POIs, is there any performance benefit to using shape file VS WMS tile PNGs? Any ...