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

learn more… | top users | synonyms (1)

0
votes
1answer
25 views

leaflet How to bounce map [duplicate]

I would like to do button like Fly to Bern button in the below link. Is it possible to do ? http://openlayers.org/en/v3.2.1/examples/animation.html var flyToBern = ...
0
votes
0answers
70 views

Accessing GeoServer 2.8.0 on Debian 8 using Tomcat 8?

Not been able to access my Geoserver with Javascript. The Leaflet code running natively works in other javascript/HTML pages which connect on-line GIS servers. Added ENABLE_JSONP true to web.xml ...
2
votes
1answer
45 views

How to change leaflet marker options dynamically?

I want to change the draggable state of leaflet marker on some event. Now, we use marker.options.draggable to get the draggable state of that marker. However, I want to set/change that draggable state ...
1
vote
1answer
61 views

How to remove marker added map with .addTo() function in leaflet?

I am having trouble removing marker which is added with marker.addTo(map). The remove works correctly if added as layer map.addLayer(marker) and then map.removeLayer(marker). But removelayer is not ...
0
votes
1answer
29 views

How to get attribute of the leaflet marker?

is there a way to get and hold the option attribute of the leaflet marker? marker = L.marker([lat,lng], {draggable:true,icon: L.AwesomeMarkers.icon({icon: '', prefix: 'fa', markerColor: ...
0
votes
0answers
29 views

Leaflet button sizes differ on mobile device

Two of the following buttons, when the page is opened from a desktop device: look different when opened from a mobile device: I am not sure how to go about debugging this. I am using Leaflet ...
2
votes
1answer
52 views

Invalid GeoJSON when inserting data to a CartoDB (PostGIS) table from Leaflet

I've been following along to this tutorial from CartoDB. I create the GeoJSON using: var drawing = "'"+JSON.stringify(layer.toGeoJSON())+"'"; and then inserting using a custom SQL function ...
0
votes
1answer
22 views

cannot get properties of multipolygon - mapbox/leaflet

I'm currently using mapbox with natural earth and geojson to populate a map with multipoygons and custom markers. Each of these has a set of properties and information that I need to display on click ...
0
votes
1answer
73 views

How to add a bounding box filter to this leaflet WFS request?

I use this function to add an interactive layer to my leaflet application. It works great in most browsers, but fails due to time-out error on certain networks and browsers. The solution I think is to ...
1
vote
1answer
106 views

Leaflet: How to create toggleable overlays from a single GeoJSON FeatureCollection?

I am a beginner to Leaflet/Mapbox and I can create a simple map and plot all the points from a GeoJSON FeatureCollection, but I am unsure how to add the ability to toggle (via checkboxes) specific ...
0
votes
2answers
42 views

Leaflet: click feature to get external diagram

I am working on a Leaflet webmap which receives a layer withs polygons from ESRI REST API. I want to implement this: When the user clicks on a polygon a diagram shall pop up below the map. The ...
0
votes
0answers
31 views

Mapbox Geocoding Custom UI

I am building an interactive mapping web app and needed to bounce some ideas off of you all. I need some guidance on how I would go about bypassing Mapbox's addGeocoderControl and use a search box on ...
1
vote
0answers
249 views

R : How to build heatmap with the leaflet package

I read a post about interactive maps with R using the leaflet package. Very interesting by the way. In this article, the author create a heatmap like this: X=cbind(lng,lat) kde2d <- bkde2D(X, ...
2
votes
2answers
87 views

Leaflet Vector Layers Not Rendering During FlyTo Animation

In version 1.0 of Leaflet, when using the FlyTo function as per this JSFiddle, is it possible to force vectors to render/ draw as the animation is happening? My current issue is when using the ...
1
vote
2answers
153 views

Fly To Location in Leaflet

Is it possible to 'fly to location' in Leaflet in the same way as this Mapbox GL example?
2
votes
1answer
29 views

Making a Leaflet line feature more 'grabbable'

Is there a way to increase the buffer that makes a line clickable in Leaflet? I know you can increase the width of the line, but the symbology of my feature should not be altered in this case; it ...
0
votes
1answer
20 views

Finding contiguous geographical units

On a map with territorial units, I wish to be able to compare a property of one territorial unit with those surrounding it. How can I find the contiguous territorial units of a specific one ?
1
vote
1answer
80 views

Using custom icon markers with Folium?

Given that Folium builds on the Leaflet JS library, I was wondering if it could provide the same functionality as Leaflet for custom icon markers. Scanning through the tutorial here, I'm somewhat ...
0
votes
0answers
34 views

GeoJSON to GPX with togpx

I have a leaflet map that I use for directions (routing) and I'm trying to convert geoJSON to gpx (for exporting) using the togpx js. Everything works okay and I can see the gpx in my console, but ...
1
vote
1answer
90 views

Fixed position PopUp window on hover and click on map exported from QGIS with qgis2leaf

I have exported a QGIS map to leaflet using qgis2leaf plugin. I would like to have the popup window open on a fixed position (for example top-left) both when the user hovers over the location marker ...
0
votes
1answer
32 views

How do you toggle between layers that have been loaded using the FileLayerLoad.js?

I'm trying to toggle between geojson layers that were loaded using the filelayerload javascript. Right now I'm basically stuck on how to append the geojson layers to one variable once they have been ...
1
vote
2answers
53 views

Mapbox Natural earth map disappears on zooms 0 & 1

As the title says, I'm currently using mapbox to create a little atlas app the issue is whenever I zoom out to anything lower than zoom level 2, the map dissappears with the map background being the ...
2
votes
1answer
26 views

Map with style (color, border) depending on property value

Using Leaflet combined with D3, I'm trying to apply a style (e.g. colorize or draw a border) to units that share a same property value. Further explanations Context: townships in France are grouped ...
1
vote
1answer
38 views

Google Spreadsheet as Configuration for Leaflet App

I would like to build a Leaflet Webapp that is highly adaptable and easy to configure. Therefore I would like to use Google Spreadsheets to store the configuration and retrieve the stored information ...
0
votes
2answers
99 views

Trying to use bringToFront to order combined tile layers layergroup for leaflet basemap

I've combined a from a geoserver WMS tilelayer (trails) seperately with a mapBox streets-baseic and mapbox sateline using LayerGroup to form two basemaps, "Streets" and "Imagery" available for a ...
0
votes
2answers
136 views

Is there a way to embed a Leaflet map into a Wordpress theme website?

I recently decided to make my own website, but chose to use a Wordpress theme to save me time in designing. Unfortunately it primary uses php which I am not familiar with and end up breaking my page ...
-1
votes
1answer
37 views

JSON to line string

I'm getting a JSON return like so: ...
1
vote
2answers
114 views

Native Mapping Application - Leaflet Mapbox

I am going to build a native mapping application that I would like to offer for Android and IOS devices. I am an accomplished developer of web-based app using javascript, html and css. I am also ...
1
vote
2answers
99 views

Why do my kml polygons move during zoom (using leaflet and meteor with OpenStreetMap)?

I'm using meteor.js and leaflet.js to build a simple application that displays kml polygons on an openstreetmaps layer. I can get the polygons to display fine, but during a zoom operation the polygons ...
1
vote
1answer
128 views

Leaflet Marker Cluster: refreshCluster function issue

I am trying to use the markers.refreshClusters(); function to refresh the marker icons for a new styled icon I am trying to work with to highlight the selected cluster. Unfortunately, I keep getting ...
0
votes
0answers
43 views

JSF2Leaf - JSF page parameters to bean

I'm using jsf2leaf framework to draw trajectories between two markers, like example. I need to send two parameters (id of point) to search possible trajectories between both. At the moment the ...
1
vote
2answers
140 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
178 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
63 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
49 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
1answer
302 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
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
50 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
71 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
45 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
62 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
48 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
111 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
40 views

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

I have a webmapping view that needs to be secure and use only https calls for layers. I would like to include some basemaps such as Mapquest OSM and OpenSeaMap which do not (as far as I can see) have ...
4
votes
1answer
88 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
44 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
128 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
78 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
38 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
118 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 ...