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

learn more… | top users | synonyms (1)

1
vote
2answers
354 views

Invalid GeoJSON object

I'm working with Leaflet trying to get some GeoJSON going. Everything works fine when I directly define a var as the GeoJSON I'm trying to display: var censustracts = { "type": ...
1
vote
1answer
380 views

Leaflet Opacity Control Using Slider For Bootstrap

I am attempting to use the Slider For Bootstrap to update the opacity of a layer within Leaflet. The slider also needs to be in a Bootstrap Popup but this part is working. As per this JSFiddle you ...
0
votes
1answer
95 views

WFS Leaflet script not working

This opens just fine in the browser and the server seems to respond positively to the WFS request.. but nothing loads. Can someone help me out here? <html> ...
1
vote
1answer
66 views

If bounds contain a polygon PHP-Leaflet

I have the latitude and the longitude of view of map ( latitude and longitude of north west and the latitude and longitude of southeast ) and a geojson files with MultiPolygon. (43mo) In PHP i want ...
2
votes
2answers
649 views

How to calculate the bounding box of a geojson object using python or javascript?

I have django app with leaflet on the frontend and I need to calculate the bbox of my geojson so that I can pass the coordinates to map.fitBounds() I have tried some libs as well as trying the ...
0
votes
1answer
50 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
78 views

WFS request works in Geoserver but server returns error

I'm trying to send a WFS request to my Geoserver but there is something wrong. Here's what I get when I select the JSONP: ...
2
votes
1answer
176 views

Leaflet popup options with geoJSON data

In the following how would I customize the popup options? I want to add in the option for the keepInView to be true. var myLayer = L.geoJson(polygon, { onEachFeature: yourOnEachFeatureFunction ...
1
vote
1answer
56 views

Lat long co-ordinates in geojson format for Alaska(smaller), bigger Guam and Puerto Rico?

How do I get the geojson format of Alaska, Guam and Puerto Rico in different sizes ? The sizes I have for Alaska is too large and too small for Guam and Puerto Rico. I'm very new to mapping ...
0
votes
1answer
73 views

Combining two leaflet plugins

I am new to leaflet (but I used leaflet with R) and javascript. I have discovered two great leaflet plugins, Leaflet.Elevation and leaflet-gpx. I managed to make them work individually, but I was ...
0
votes
1answer
89 views

Change anchor of leaflet icon

I'm currently using a div icon to show a small graph as a marker on a leaflet map. The graphs change dynamically based on the day of week using data from a database, which changes the height of the ...
0
votes
1answer
220 views

map.on('click') event disables the double click zoom

I have a map that has an onclick event fired and displays a marker where the user has clicked. Problem is that this event seems to overrun the double click event. Because of this, when I double click ...
1
vote
2answers
70 views

Using a proxy for unsecure Mapquest layers in Leaflet L.tileLayer call

I have a web mapping client that needs to be secure and use only HTTPS requests for layers. I would like to include some basemaps such as Mapquest OSM and OpenSeaMap which do not (as far as I can see) ...
4
votes
1answer
118 views

GeoJSON Layer Order In Leaflet 0.7.5

I am developing a web application that brings in a number of tileLayers and geoJSON layers. For the tile layers I have been able to do similar to this JSFiddle in that the layers appear depening on ...
0
votes
1answer
45 views

Visitors to city's website can digitize points? [duplicate]

I'm trying to collect input on a revision to my town's mainstreet. Is it possible to create a map where a visitor can click a point, and answer a few questions about that point? (OK I was told that ...
1
vote
2answers
231 views

Applying a single leaflet search control to search multiple layers?

I am attempting to add a single search button to look through geoJSON layers. They will look through the field "name". Unfortunately, my method of creating a layer group is not working. What am I ...
0
votes
1answer
123 views

Can't enable Jsonp in Geoserver 2.7.0 and then publishing my WFS request in Leaflet

I'm working on localhost:8080 and want to get WFS data in a Leaflet map. So, I've read in some posts here that I first I have to enable Jsonp in my web.xml file in Geoserver. So I put ...
1
vote
0answers
57 views

Leaflet.js setBounds, scaling

I'm using leaflet.js to create a map of Scotland, with two insets for the Orkney and Shetland groups of islands. This is as far as I've got. I wish to guarantte that no matter what size the overall ...
1
vote
2answers
168 views

Separating two GeoJSON files, one with properties and another with geometry?

Using Leaflet with GeoJSON, I would like to create a map with geometries, and with alphanumerical data associated to each item of the geometry. A map very similar to the easy sample at ...
0
votes
1answer
149 views

How to select layer by default : leaflet

I am working with the leaflet, where we first load the imageoberlay to the map using user input. Now, i been trying different methods to select that layer by default. The problem is only that the ...
0
votes
1answer
90 views

Leaflet Search for GeoJSON creating duplicate, non-functional buttons

I added a plugin for searching a GeoJSON file in leaflet, but now there are multiple search buttons and they do not recognize any input. I suspect that it is initializing for every single instance of ...
1
vote
0answers
102 views

How to pass custom marker to polyline decorator

I am working with leaflet appliction, where user draw some shape. A polyline added to that shape using leaflet.polyline.decorators. I just want to know how to pass custom marker to L.Symbol.marker(). ...
0
votes
1answer
113 views

Clickable hyperlink from GeoJSON field in feature

How do I make a URL a hyperlink when the information is called from a GeoJSON field? I have tried adding html tags, but since the link is not in-line, it does not work. (Script below) LOC_Catalo is ...
0
votes
1answer
153 views

Activating Search Plugin with JS Leaflet

I am attempting to add the following plugin to search a GeoJSON file I have open in Leaflet Javascript: http://labs.easyblog.it/maps/leaflet-search/examples/geojson-layer.html I have brought in the ...
0
votes
1answer
95 views

Do all open source web mapping platforms require programming? [closed]

I currently use a proprietary software product for my company's web mapping, however I am interested in seeing other products. I use QGIS and would like to to put my layers on the web for both ...
0
votes
0answers
53 views

ClearLayer() not working for polyline Decorators

I am working with leaflet api, where user draw shapes on images. Clearly i am having problem with polyline decorator because clearlayer method doesn't seem to work for decorators, might be a bug ...
0
votes
0answers
89 views

How to stop polyline decorator marker displaying on map but image layer

I am working on application uses the leaflet api Live Here User must enter "1" in alert input field to use the application. Introduction Application has some controls to draw different shapes on ...
0
votes
0answers
62 views

WFS query against SQL Server - Returned results not restricted by query

I have an SQL Server 2012 table, which contains a DbGeometry column with a spatial index. Then a Geoserver 2.7 using it. The problem is that when I do a WFS query it doesn't restrict the results to ...
3
votes
1answer
46 views

Use custom dataset for routing

I'm looking to substitute my own dataset with OSM data in Leaflet Routing Machine or another routing tool. Is this possible?
0
votes
1answer
123 views

Leaflet Layer Visibility Checkbox

I have created this JSFiddle OpenLayers map that toggles the layers visibility using the bootstrap-switch. I am looking to achieve the same with leaflet but can't seem to get the equivalent of the ...
1
vote
0answers
73 views

Selecting leaflet markers based on Json features [closed]

I have data coming from a Json file and I created a layer based on this Json file using markerClusterGroup. I am hitting the wall trying to do two things: 1 - Select some markers based on some Json's ...
2
votes
3answers
236 views

Custom Styling OpenStreetMap without needing to host it yourself

I know it's possible to edit the way in which OpenStreetMap display, with CSS-like (like MapCSS) stylesheets. Is possible to do this without having to host your own tile server?
2
votes
0answers
35 views

How to place image between two marker using css : leaflet

In my application where i use leaflet api, i am able to put two gate markers and polyline drawn between them. Here, i just wanted to find out the way to put the image from css on the polyline which ...
1
vote
0answers
23 views

Drawings not visible after removeLayer method : leaflet

Introduction As i am working on application which uses leaflet api. Live Here Where first user enter '1' as input to load the image on map. Then user can draw different shapes(fences) using ...
0
votes
1answer
298 views

How do I show feature attributes in a Leaflet popup?

So I have a JSON file displayed on my leaflet webmap. I would like to have it so a popup will appear when a feature is clicked. Right now it is a polygon feature. How do I call up information from ...
2
votes
3answers
99 views

get external jsonp and convert coordinates in leafletjs

I need to solve two problems: convert my coordinates from wgs84 to epsg28992 use external geojson from an jsonp url Both problems are as far as I understand not supported by Leaflet itself. So I ...
2
votes
1answer
118 views

Leaflet search GeoServer layer

Let me start off by saying that I'm new to web mapping, but I've managed to put together a fairly simple web map using Leaflet: http://www.hcswgis.com/globalmapper/ It has most of the functionality ...
0
votes
0answers
71 views

Changing tooltip layers with leaflet/mapbox

I'm a relative beginner with leaflet/mapbox but we are building a website with a set of different TileMill layers, each of which have different interactivity. We had been switching layers with ...
2
votes
1answer
189 views

How to apply css on polylines : leaflet

I am working with the application which uses leaflet api. Introduction I needed to draw different types of fences, using decorators i can somewhat apply good visuals to the polylines but not much. ...
0
votes
0answers
40 views

How to get the directions of the co-ordinates in leaflet?

Now i'm working on the live tracking to track my vehicle.I want to get the directions to change the marker position based on the co-ordinates. I have using arrow icon for marker icon. I need to ...
3
votes
1answer
63 views

Get tile layer intensity at given zoom and longitude/latitude (Leaflet)

I can display a tile layer as an overlay in Leaflet via an url of the form path/to/my/tile/layer/{z}/{x}/{y}.png : my_overlay = L.tileLayer('http://path/to/my/tile/layer/{z}/{x}/{y}.png', { maxZoom: ...
2
votes
2answers
62 views

Leaflet - tell whether an object a layer or a group

I need to close popups on an object, but I don't know whether it is a layer or a geoJSON (and hence a feature group). If the former, I can do layer.closePopup(), but if the latter, I have to do ...
1
vote
2answers
94 views

Load geojson files from a dropdown list

I would like to load geoJSON from a dropdown list. Everything i found was internal plugin for leaflet such as leaflet-geojson-list. I have a html dropdown list but I don't know how to link my geoJSON ...
1
vote
1answer
65 views

Problem with legends, leaflet

I am not very good at js and new with leaflet so i my code may be a bit messy but stil... I have a problem with my legends, i have 2 legends and many overlays and i want some legends to be "linked" ...
0
votes
1answer
182 views

Leaflet : How to update polyline ? Live Tracking

var ColorVar = '#bd0026'; var firstpolyline = new L.Polyline(polyList, { color:ColorVar, weight: 8, opacity:0.8, smoothFactor: 1 } ); ...
0
votes
0answers
29 views

How To create a OpenLayers-Control from existing Leaflet-Plugin

I already asked a question on Stackexchange that no one could answer: MarkerCluster Animation for OpenLayers2 with Lines So I would now like to know if someone has already used a Leaflet-Plugin to ...
2
votes
1answer
496 views

installing geojson-vt with Leaflet

Super rookie question I'm sure, but I need help using the leaflet plugin geojson-vt. According to tutorials, like this one on http://bl.ocks.org/Sumbera/c67e5551b21c68dc8299, there should be a js file ...
0
votes
1answer
110 views

Use lamber 93 imageOverlay with leaflet on top of OSM tiles layer

I'm trying to use a lambert 93 image overlay on top of an Open Street Map title layer. var map = L.map('map'); L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { }).addTo(map); var coords = { ...
0
votes
1answer
303 views

Bootstrap and Mapbox: Nav Bar layer selection

I am building an interactive mapping solution for my employer and have run into a bit of a hangup. I am working with bootstrap for the first time and cannot figure out how to link the dropdown list ...
0
votes
0answers
43 views

Setting maxbounds in leaflet according to WFS / WMS layer bounds

A leaflet map has the option to set the maximum bounds a user can pan it. I'd like to set these bounds dynamically (i.e. setMaxBounds method) according to the bounds of a given WFS layer. The goal is ...