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

learn more… | top users | synonyms

0
votes
0answers
6 views

Displaying a textbox on a certain point on 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 ...
0
votes
1answer
146 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
14 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
5 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
20 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
26 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
21 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
705 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
113 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
77 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
210 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
15 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
29 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
287 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
7k 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
128 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
9 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
19 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
128 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
469 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
686 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
264 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
211 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
287 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
29 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
39 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
75 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
28 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
154 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
160 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
53 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 ...
0
votes
1answer
40 views

fitBounds on points after feature selection

I am trying to follow some of the examples I have found here and in Google Groups about fitBounds for points. Most of the examples are for polygons and don't seem to work for points. I think I've ...
2
votes
1answer
141 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 ...
3
votes
1answer
2k views

CloudMade Routing with Leaflet: route is not displayed

I am trying to consume the CloudMade routing API using Leaflet. So far, I have managed to pass points and receive a response, and parse that response into an array of points. The array of points is ...
4
votes
1answer
156 views

Editing PostGIS topology in a web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
0
votes
1answer
96 views

How to compute and add the bounding box for every feature in a given geojson file

I have a geojson file. I need to find the bounding box of every feature in the geojson, then find the intersections between any two bounding boxes. I am using leaflet and Angular to display the ...
0
votes
0answers
8 views

using gzipped js files in windows 8 OS

Previously, we were using a private ISP to run our web site. They were using LINUX. We could use js.gz files to serve interactive maps. Now, we have our own server with Windows 8 OS. How we can serve ...
0
votes
1answer
31 views

CartoDB.js SQL API editing geometry

Is there anyway you can allow users to edit the geometry of shapes (e.g. move an existing point) using the CartoDB.js or CartDB SQL API libraries. I realise you can do this directly in the CartoDB ...
0
votes
1answer
378 views

PHP-MBTiles Server implementation with Leaflet and Wax

Using PHP tile server from infostreams with Leaflet and Wax Connector for Leaflet to visualize my .mbtiles. I upped the source and the .mbtiles on a free hosting service. I am getting a blank Leaflet ...
5
votes
3answers
145 views

Guidance when to style your features in Tilemill vs. Leaflet?

I've found this generally to be dependent on each project's goals (or what the client wants), but when you have the options, what any rules of thumb or guidelines do use you in a project to determine ...
0
votes
1answer
179 views

TypeError in leaflet on zoom in or out

I am working on an application that renders land parcels from PostGIS as polygons in Leaflet. I have an event handler set for 'viewreset' on the map: this.leaflet_map.on('viewreset', ...
2
votes
1answer
744 views

UTM Grid as a Layer with Leaflet

How can I display a UTM Grid as a layer with Leaflet? Search a way to embed a OpenStreetMap map with Leaflet in a website. Particularity. I want to display a UTM Grid as a Layer. In addition, lower ...
0
votes
0answers
36 views

Radius based search with Leaflet maps

Using leaflet I have created a simple map, played around with markers (adding/removing) and have added some GeoJSON data polygons etc. I now need help with implementing a radius search. For example I ...