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

learn more… | top users | synonyms (1)

2
votes
1answer
90 views

Zoom to GeoJSON point feature in leaflet

I'm relatively new to Web Mapping and trying to develop a litte Application with Angular JS and the angular-leaflet-directive. In this application I will work with a GeoJSON point layer representing ...
-1
votes
1answer
24 views

Change the center point of leaflet

By default zoom to, setview functions show the center point of the map in the center point of div measured by pixel of browser. I want to show the center at slightly right when left panel is visible. ...
0
votes
0answers
37 views

Searching for more than one propertyName?

how can i search for more than one propertyName? This is my code: var searchControl = new L.Control.Search({layer: mylayer , propertyName: 'myfirstproperty' , circleLocation:true , zoom: 15.0}); ...
2
votes
1answer
42 views

Tiles from gdal2tiles won't appear on leaflet map

I added the OSM tiles and my tiles(193ortho) which I am serving from the same folder that html file is in, but the tiles I made won't appear. The tiled images appear fine in the webviewer that is ...
1
vote
0answers
50 views

How to draw a raster over the World using Postgis

Im currently working on a system to track user interaction on mapwidgets. Now i need to visualize the bounds that users are looking at on the map. Since were using a whole lot of data i need to find a ...
1
vote
1answer
34 views

Leaflet CRS and PostGis

From the Leaflet.js documentation it states that it uses a default CRS of 3857. This implies that if I am going to generate points with PostGIS based on polygons, or points created by drawing or ...
1
vote
0answers
30 views

Same behaviour for minzoom for google maps api and leaflet

I need to implement the same behavior for leaflet and google maps for the case of minzoom. Google maps duplicates all the objects from the main map to the world`s copies, however leaflet doesn't since ...
0
votes
0answers
32 views

How to have same baseLayer and overlay layer in leafletjs

I am using leaflet.js with baselayer tile url: L.map('map', { maxBounds: this.bounds, maxZoom: 13, minZoom: 3, ...
2
votes
1answer
32 views

How to iterate through the attributes of a feature in Leaflet?

I receive polygons via the ESRI REST API with Leaflet. I want to iterate through all attributes of a feature in order to create a custom pop-up for it. My code looks like this: myLayer.on('click', ...
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
74 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
63 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
30 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
30 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
56 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
75 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
111 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
35 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
256 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
91 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
162 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
87 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
94 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
35 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
54 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
108 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
139 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
120 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
104 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
138 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
46 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
152 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
191 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
65 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
317 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
52 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
77 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
46 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
64 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 ...