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

learn more… | top users | synonyms (1)

2
votes
2answers
32 views

CartoDB latlon change to lonlat

I have this script I am trying to use to search for a value within a CartoDB table. I can't seem to figure out how to reverse the order of the lat & long coordinates so they appear as lonlat... ...
1
vote
2answers
139 views

Heatmaps: right terms (isopleth vs choropleth, etc) and how to implement a value-based one that looks good?

NOTE: My original question was about interpolation methods, but I've found that I was actually asking the wrong question. Interpolation methods with Heatmaps and IDW are the least of my problems right ...
0
votes
0answers
37 views

Mapbox.js: Bind dynamic popups with featureLayer?

I am building a multiple chloropleth map using v2.2.1 of Mapbox.js with featureLayer. Now I would like to add tooltips with custom content on hover event. This code is working well to set up the ...
1
vote
0answers
33 views

Geoserver create generic dynamic style

I'm quite new to geoserver, and I wonder if its possible to create a dynamic style. I got a big shapefile with more than 600 variables, and I want to create a generic style where you can input the ...
0
votes
1answer
91 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 ...
4
votes
3answers
852 views

geoserver heatmap tiles doesn't display well (with leaflet)

I am trying to display a heatmap generated with geoserver on my map using the L.tileLayer.WMS class from Leaflet, but the tiles do not fit well together. Do you have any idea how to fix it?
1
vote
2answers
43 views

Leaflet's shapefile plugin only compatible with Firefox

I created a html page (currently locally) and used Leaflet to create a basic map to which i plan to add several shapefiles. To do this, i use the leaflet.shapefile extension ...
42
votes
5answers
23k views

Should I use OpenLayers or Leaflet?

I was debating with one of my collegues on OpenLayers v/s Leaflet. I made a point that OpenLayers is much better API if we wish to build a project, where you need direct connectivity to the Geoserver ...
0
votes
0answers
7 views

How to change Level Zero Tile Count in Leaflet

I have a tile map that I want to display using Leaflet but the base layer is 4 tiles by 4 tiles instead of the usual 2 by 2. Is there a way make this work with Leaflet?
0
votes
1answer
20 views

How to configure Apache for topojson gzip files

Building an online interactive map with leaflet and some heavy layers with my spatial data in topojson format. I have been reading about gzip but I am still uncertain how to configure it. Do I need ...
2
votes
1answer
80 views

Legend not removed when layer changed [closed]

I made this webpage with JavaScript and CartoDB. The layer selector works like I expected it to but I noticed that the legend are stacking on top of each other and not being removed when the layer is ...
8
votes
4answers
12k views

Custom Leaflet Controls

I have gotton some help in creating a custom control for leaflet, but I am still having trouble upgrading to the CSS styles used by the latest versions of Leaflet. Basically, all I need is a icon in ...
0
votes
3answers
108 views

Collapse leaflet control

I want to collapse a leaflet control on my map. I have the current code: var legend = L.control({position: 'bottomright', collapsed:true}); legend.onAdd = function (map) { var div = ...
0
votes
1answer
136 views

Leaflet: Scroll wheel controlling map zoom and not drop down menu

Edited 6/19/2015 I have a custom leaflet control box with a drop down menu. When I use the scroll wheel over the menu, the map changes zoom level instead of scrolling the menu. The problem occurs ...
2
votes
1answer
35 views

disable onEachFeature at zoom level, leaflet

I have a leaflet map that zooms and fits on the bounds of the polygon that is clicked via onEachFeature. Is there a way to disable this at a certain zoom level? I add new layers on the 'zoomend' ...
0
votes
1answer
54 views

Image won't center in Leaflet pop-up

I am using Leaflet to create a map of points (from geojson) that will open a picture and text under the picture. The text is centered, but I am having trouble centering the picture. This seems like ...
0
votes
0answers
35 views

Leaflet - Getting tile border coordinates

Displaying grid borders is fairly easy with CSS or adding an image like this: The result is a map like this: However, I'm having a hard time trying to get the coordinates of those tile borders. ...
1
vote
1answer
39 views

Leaflet Routing Machine won't read waypoints from variable TypeError: t is null

I am trying to add waypoints from a variable to a leaflet map. The resulting variable split_route1 is formatted correctly and when I hard-code the waypoints from the console log results, the ...
1
vote
1answer
29 views

WMS layer details not clearly visible in Leaflet

I cannot figure out where the problm is. I use GeoServer and Leaflet. My problem is that when I visualise some layers (in particular that with the names of the clients) I cannot see them all at each ...
1
vote
1answer
499 views

Getting Leaflet and image popup from QGIS export working?

I am a novice in using leaflet, I exported my map layers from QGIS to a working Leaflet map. I am trying to modify the popup to use the attribute so as to get an image popup. i am however stuck as i ...
2
votes
1answer
379 views

Formating GeoJSON file with Leaflet Ajax-plugin

First of all I apologize for my basic english. I have to say, too, that I'm really a newby in coding. I'm trying to create an interactive map using Leaflet (you can see it here). I was able to show my ...
4
votes
2answers
120 views

Batch create Leaflet webmaps in QGIS

During a project on the spider fauna of Greece, we have to face the design of distribution maps of the species. A good tool to work with is the design of Leaflet webmaps to be used on the website ...
0
votes
0answers
32 views

How to load GeoWebCache tiles into Leaflet?

Tiles are already created in GeoWebCache, but they can't be loaded into Leaflet. I can't figure out where I did wrong in the settings of GeoServer. Could anyone point out the possible cause? ...
0
votes
1answer
33 views

Selecting features by attribute in Leaflet

Is there a way to select an individual feature based on an attribute from a FeatureGroup in Leaflet? For example, when selecting a feature based on a click event, I will do something like, function ...
0
votes
1answer
52 views

QGIS2WEB white screen on export/preview?

When I export my QGIS2WEB project it goes through, but when it loads up in my browser after the export is done all I see is a white background with the zoom/minus feature in the top left hand of the ...
1
vote
1answer
64 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 ...
2
votes
2answers
57 views

Qgis2leaf doesn't show layers with scale-dependent visibility

When I add layers to the QGIS2LEAF dialog box it accepts it and opens up the preview in my web browser, but when I starting looking for the layers, in this case points for campgrounds, I dont see any ...
0
votes
0answers
27 views

Leaflet controls: onAdd() -> “ready” event

I've got a custom control for Leaflet (0.7.3) that uses L.DomUtil.create to generate its own HTML in the onAdd() function. Most of its bootstrapping happens in onAdd(), but I need to do some final ...
0
votes
0answers
412 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 ...
2
votes
1answer
19 views

Input a number for user's number entry

The following code works fine. When I click the "Test Play/Stop" button a series of points from the 'geojson' list are drawn with popup attributes one by one. The time interval is defined by the ...
0
votes
1answer
17 views

Reading values/attributes from external *.txt file

The following code works fine. When I click the "Test Play/Stop" button a series of points from the 'geojson' list are drawn with popup attributes one by one. How can I put the list 'geojson' as ...
0
votes
2answers
81 views

How to transform EPSG:3857 to tile pixel coordinates at zoom factor 0?

I'm creating a Leaflet map with an WebGL overlay (using L.CanvasOverlay) which renders a street network on the GPU. Let's assume I have a point (1497143.62, 6896952.18) in EPSG:3857 and want to ...
2
votes
0answers
43 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
0answers
24 views

In Leaflet how to use control on an existing div?

In Leaflet, adding control classes like Zoom In/Zoom Out is possible. But I do not want to add a new div into my html. I want to use an existing div to contain my tools. I am pretty sure that it can ...
1
vote
1answer
26 views

Shared markers/paths in layer groups - toggle issues

I'm working on a map that displays the trips I've taken. I've created many markers and lines to designate locations and the paths between them. I've created trips using the required markers/paths and ...
1
vote
0answers
35 views

Leaflet Temporal animation of marker clusters

I recently have applied the markercluster leaflet plug-in to my map and I was wondering if something like leaflet.timeline would be compatible with cluster visualization? if not is there any other ...
0
votes
1answer
54 views

R-Leaflet: Plotted points on wrong country

I am learning the leaflet package and am running into a snag. To learn the package I am using the Snow deaths dataset from the package HistData which contains historic Cholera deaths from an epidemic. ...
0
votes
1answer
28 views

Proj4Leaflet create CRS scales/resolution from WMTS getCapacilities ScaleDenominator

I trying to set up the CRS scales/resolution for a map accordingly to the provided information of an WMTS getCapabilities request. At the moment I'm playing with the following service. The service ...
2
votes
1answer
202 views

Can't project ArcGIS Tiled Service for Esri-Leaflet

I'm following this example from the esri-leaflet docs. I have an ArcGIS Tiled MapService in ESRI:102696. So I'm trying to use Proj4Leaflet to project the service and use it in my application. I ...
0
votes
2answers
78 views

QGIS2WEB Error when exporting to Leaflet/OL3

I am having all kinds of problems with the QGIS plugins fr exporting my map to Leaflet or OL3. Whenever I try to preview my project I just get a white screen with nothing. Then when I try to Export to ...
3
votes
1answer
122 views

Navigate two leaflet maps

I am looking for an example where there would be multiple map divs containing leaflet maps. When one is panned I want the other one to pan or zoom with it so they are always in sync.
1
vote
0answers
89 views

Leaflet : Change marker icon from onEachFeature instead of pointToLayer

I'm referencing external data, matching it up with particular fields in feature.properties and using that to decide which layer to put the feature in, all of this from inside the onEachFeature part. ...
0
votes
1answer
73 views

Map Not rendered Leaflet but renders correctly in changing the zoom level of browser

I am loading a leaflet map rendering mapbox tiles, geojson layers (initially i dont show the map) and i also have tabular links which can be seen when the page loads, the links are list of places and ...
4
votes
0answers
46 views

Describing borehole information with geojson (javascript)

I deal a lot with borehole information and looking the best way to move it around in javascript / take advantage of javascript libraries (e.g. leaflet) for looking at this information on mobile ...
1
vote
2answers
160 views

IE8 problem with proj4.js

This problem is in IE8 and not in Firefox. My first problem was that IE8 don't support JSON natively and I get the "JSON is undefined". I solved this by including json2 or json3. Now JSON.parse ...
1
vote
0answers
19 views

Leaflet inbuild AJAX methods for WMTS getCapabilities request

I was wondering whether the Leaflet library has inbuilt methods to make AJAX requests. My goal is to create a plugin that makes an XMLHttpRequest request to a specified WMTS resource and parse the XML ...
1
vote
1answer
101 views

Using Mapbox (LeafletJS), how do I edit imported shapes from GeoJSON?

Overview: I'm currently working on a project where I'm importing GeoJSON into a map using Mapbox. However, I'm wanting to be able to edit those shapes once imported into the map. I've gotten the ...
0
votes
0answers
18 views

Open Popup on CartoDB Layer

I have a cartodb viz layer (polygons) and geojson layer in a leaflet map (parcels), where the geojson layer overlaps the cartodb layer. How do I disable the interaction to the geojson polygon layer so ...
0
votes
1answer
52 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 ...
1
vote
2answers
28 views

Embed Sound in Leaflet Popup with QGIS

I was wanting to embed some animal sounds in a leaflet map my son and I are creating. Have images embedded, but would like sounds in the popup if possible. Like embedding images, can this be done ...