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

learn more… | top users | synonyms (1)

0
votes
1answer
42 views

Speeding up large GeoJSONs in Leaflet maps

I've been racking my head around this problem for some time and I could use some help; I am trying to use Leaflet to make a map which displays multiple projection boundaries, i.e. UTM, State Plane, ...
1
vote
1answer
65 views

z-index of geoJSONs and imageOverlays in Leaflet

There have been several Github issues raised regarding Leaflet z-indexing of layers, and I'm still not clear where things stand. I think my question is quite simple: Is it possible to set any ...
3
votes
1answer
36 views

How to fully Style a marker in leaflet?

Styling a marker is possible with pointToLayer I dont know how to get a marker change style for mouse over and for click etc.... var map = L.map('map', { zoom: 14, ...
2
votes
1answer
27 views

Displaying colored traces and waypoints

Goal: display map with few routes, which have colored segments. Also displays few waypoints with text + gives option to download few gpx routes and additional text. I see that gpx format has ...
1
vote
1answer
155 views

Field Collection App for Geoserver or Any OS GIS Server [closed]

I am looking for a mobile app/interface for field data collection and mobile editing of GIS data that relies/syncs back to some type of GIS server or database. I am aware of Fulcrum and AmigoCloud, ...
1
vote
2answers
550 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
1
vote
0answers
37 views

Tilestache Vector Tiles with Leaflet [closed]

I've set up a tilestache server and I am displaying vector tiles from the service using leaflet and the leaflet-tilelayer-geojson script from: ...
0
votes
2answers
36 views

Make a leaflet TileLayer appear above a GeoJSON layer

I'm trying to add a layer of place labels above a GeoJSON layer, so that these labels remain visible. However when I add the layer per the code below, the tileLayer remains below the GeoJSON layer. ...
1
vote
1answer
30 views

Problems with simple Leaflet + Mapbox TitleLayer?

I'm completely new to GIS, and thought I would start off with the leaflet quick tutorial. However, I'm having problems with adding the base tile layer with Mapbox. This is my code so far: ...
0
votes
1answer
38 views

Leaflet + GeoJSON and ArcMap : Map fails to load if missing variable

I am working on my first web map using the Leaflet API. I have a shapefile that was converted to the GeoJSON format (within ESRI's ArcMap software). The Shapefile contains a field attribute named ...
0
votes
1answer
1k views

Bootstrap navbar and leaflet zoom controls

I'm using the THE MAP GUY(DE) Bootstrap temple and applying it to leaflet using the code below. The issue I'm having is that the zoom-control doesn't toggle right on page load. It will only after ...
1
vote
1answer
28 views

Leaflet: Change icon inside a function

I have a custom function that pulls the markers from a json file called markers.json : var markers = { "resources": [ { "name": "AITokarServer", "coords": [ { "x": ...
0
votes
3answers
302 views

How to load geojson from geoserver to define a variable in leaflet?

How can I load a geojson file from geoserver in leafletjs? There are lot of suggestions out there, but none of them work for me. Currently my app loads a js file from the server that starts like ...
3
votes
1answer
23 views

How to hyperlink from polygon oncick in Leaflet?

I want to hyperlink from onclick of a polygon to new tab based on 'link' field in polygon json. When user clicks on polygon, a new browser tab is opened pointing to URL value of that polygon. I am ...
3
votes
2answers
42 views

Vector under OSMbuildings

I would like to display a circle object under the OSMbuildings layer with OSMBuildings . I was trying to change zIndex, bringToBack(), bringToFront() but it doesn't work. I don't use my own GeoJSON ...
1
vote
1answer
703 views

How to let the user resize a Leaflet map <div>

I use Leaflet to display some map. I would like the user to be able to resize the map by dragging its borders as she likes. I would like to do this without additional Javascript libraries, instead by ...
2
votes
1answer
172 views

Control to select data source on Leaflet map

I am building a map using leaflet. My data source looks something like this: var districts = {"type": "FeatureCollection", "features": [ {"type":"Feature", "geometry": ...
1
vote
0answers
180 views

How to add GeoJSON layer with GraphHopper?

I have a GeoJSON file containing some POI that I would like to be able to display within a separate layer with GraphHopper. But after several tries and search over internet, i can't manage to get a ...
1
vote
1answer
628 views

How can I project geojson borders on the google earth tiles in leaflet?

I started working with leaflet and google earth tiles. I want to add borders on my map so I tried to use the countries geoJson Data as a layer on the map. The problem is that the json borders ...
1
vote
1answer
40 views

Stubborn geojson layer misaligned with mapbox (leaflet) tiles only in production website, not in codepen or other online sandboxes

You can see my code and expected result in this running swiftly in codepen! Other online sandboxes work as expected too. The exact same code running in my php file on my wordpress site, shows the ...
1
vote
1answer
186 views

Leaflet popups events through CartoDB

How I can use the leaflet popups events throught CartoDB. I have seen that some events are working like 'click', 'movestart',but 'popupclose' and 'popupopen' are not working. My goal is to do some ...
1
vote
1answer
39 views

hide unhide layers in leaflet

I want to hide somme layers when I click in a layer and resotore the visibility back after clicking out I tried with this code but it doesn't work here also the punker code Hide show layers var ...
1
vote
1answer
260 views

Leaflet: how can I update content of popup by jQuery

in my popup is a spinner with class=spinner and an empty container for addon informations. I want to hide after successful ajax. I want to add some html in a container. I tried this: ~~~ ...
1
vote
2answers
34 views

In a webgis using leaflet, how to export maps as pdf?

Like the title says, I'm building a webgis using Leaflet. I want to allow users to export maps from the website and download them, but the current downloaded format is shapefile. I wonder if there's a ...
0
votes
1answer
24 views

Geoserver wms reflect zoom level

I am trying to get a Geoserver wms request using reflect option as static layer to embed into a webpage through a url like this: ...
2
votes
1answer
254 views

Leaflet.label and MarkerCluster problem with zoom dependent add/remove layers

Here's the setup: I have a leaflet map with point data, to which I have applied leaflet.label and leaflet.markercluster. I add the clustered point data at a particular zoom level (code below). All ...
1
vote
1answer
174 views

Is there any method to retrieve SQL queries into a GeoJSON file using JSP?

I want to display the contents of my PostGIS database of various shape-files in leaflet pop-up dynamically. I know there are static methods available that retrieves attributes. But I need to by ...
2
votes
1answer
26 views

Mutually Exclusive Bootstrap Checkbox Switches as Layer Control

I have this JSFiddle with two checkboxes using Bootstrap Switch that change the layer visibility in Leaflet. I would like them to be mutually exclusive, i.e neither of them can be on or off at the ...
0
votes
1answer
190 views

Leaflet: Find my “this” in GeoJSON.pointToLayer function

In leaflet, I have a class that extends L.GeoJSON: L.MyLayer = L.GeoJSON.extend ({ initialize: function () { this.markers = []; ... I redefined the pointToLayer method to create ...
0
votes
1answer
56 views

GeoJSON properties not displaying in popup-leaflet GeoDjango

I want to show the markers in different colours based on column(rastervalues) values in leaflet. My geojson data is {'geojson': "[{'type': 'FeatureCollection', 'features': [{'type': 'Feature', 'ge ...
0
votes
1answer
30 views

Change Bootstrap Switch Depending on Leaflet Layer Zoom

I have this JSFiddle that as you can see has two tile layers. I have set the minZoom of the 'Example Layer' to 5 so that it only loads once you have zoomed in that far. The issue is, using Bootstrap ...
1
vote
0answers
43 views

Using Leaflet and Web Map Tile Service (WMTS)

I'm trying to use an API for rendering tiles with a Leaflet map. A link to the API looks like this and I think that the format is WMTS: ...
1
vote
1answer
299 views

Rendering TopoJSON in Leaflet from GeoJSON PostGIS output?

I'm using the query found here SQL query to have a complete geojson feature from PostGIS to get a geojson that I can display on a leaflet map. However, the amount of data is kinda big and the ...
1
vote
2answers
516 views

How to open a popup on Marker click when Markers are in array using leaflet maps

Hey guys I have a set of Markers that are getting created dynamically on a .each loops like so. $.each(data, function(index, element) { markerArr[element.id] = ...
0
votes
2answers
949 views

How to export to all points within Leaflet polygon?

Is it possible to export all points within a polygon drawn using Leaflet? (http://leaflet.github.io/Leaflet.draw/).
0
votes
1answer
39 views

WMS getFeatureInfo and Leaflet

I've got an app running www.carstenhogertz.de/c_section. It has a popUp function showing the underlaying point attribute. This function shows a strange behaviour on lower zoom levels. For instance ...
2
votes
1answer
240 views

How to access Leaflet EPSG:3857 coordinates?

I read everywhere that Leaflet is internally using a spherical web mercator (EPSG:3857), but whatever I try I get either Lat/Lon (EPSG:4326) or strange coordinates I dont understand: ...
0
votes
1answer
62 views

How to calculate a map scale with bounding box, width and height?

I have a map that will allow the user to select or slice images/pictures out of it. As example a map width is 1200px * 1200px and the user selects say 700px x 700px square (note: aspect ratio is ...
0
votes
1answer
733 views

Positioning leaflet divIcon when adjusting size using css

I am using the L.divIcon when using iconSize:null which is causing iconAnchor:[0,0] to not be recognized,my code looks like this: var divIcon =L.divIcon({ className:'current-location-icon', ...
1
vote
0answers
14 views

Customize QGIS Leaflet webpage [closed]

I created a webpage QGIS map using the Leaflet plugins, how to customize , put mouse over, then features will zoom automatically while you mouse on click on the map features, and also automatically ...
1
vote
1answer
299 views

Leaflet Draw - Get Circle extent

I am using Leaflet.Draw to draw a circle. var circle = L.circle(new L.LatLng(latitude, longitude), number, circle_options).addTo(featureGroup); I need the coordinates of the circle as a polygon ...
2
votes
0answers
59 views

Mapbox GL Leaflet interaction

I've built a map in Leaflet which has a really large GeoJSON file. Currently the only way I can get it to work is if I severely simplify the GeoJSON file down from 100mb to 25mb. I'm looking at using ...
4
votes
1answer
408 views

Leaflet change color dynamically

I am new with leaflet and I need help to change the color of a polygon on a choropleth map dynamically. In my website I have an slider, and depending on the position of the handle, the colors of the ...
1
vote
0answers
41 views

First click layer selector doesn't work in CartoDB?

I'm working on an interactive map using CartoDB built of Leaflet.js. I added a layer selector which works fine after the first click. The first click just doesn't work, if I click the selected layer ...
1
vote
0answers
36 views

Popup not firing for all markers in leafletjs

I am using bindpopups to show a popup on a marker. This is a poc for showing markers on the map which has 2 markers at present but it seems like it fires only on one marker and not the second one. ...
1
vote
1answer
307 views

Leaflet custom div & click propagation on other elements

I've gotten custom HTML applied successfully within my #map element (where Leaflet is appended) but I'm having unusual behavior with other Leaflet objects that find themselves within the transparent ...
2
votes
1answer
225 views

How can I automate interactions with vector features in Openlayers3(canvas) like it is done in Leaflet(SVG)?

I want to automate and test some aspects of my map application in Openlayers 3. I mainly want to automate clicking on markers and other vector features(ideally through the DOM using xpath like SVG). ...
2
votes
1answer
187 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
4
votes
1answer
292 views

Check/uncheck overlays in groupedlayercontrol.js

In a Leaflet-based app I have create several overlays, grouped with leaflet.groupedlayercontrol.js, as shown in this image: Everything works well, but I need to uncheck certain layers, allowing the ...
0
votes
1answer
210 views

serving UTFgrid information made with mb-util with leaflet

I've created the mbtiles file with tilemill and exported it on my ubuntu webfolder with the following command: mb-util --scheme=xyz /folder/tile.mbtiles /var/www/html/my-tiles To get utfgrid ...