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

learn more… | top users | synonyms (1)

0
votes
1answer
39 views

Is there a widget/service to put a marker and send data?

I need to ask people where they want to go in the city, and as a response I need either geocoded location, or a marker on a map. Although everyone knows his home address, not everyone knows the ...
1
vote
1answer
378 views

Changing basemaps from cartodb.js

Is there a good way to change leaflet basemaps from cartodb.js or leaflet.js? I am able to grab the map object and basemap layer from the layers property in the done() promise. ...
3
votes
1answer
523 views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
1
vote
1answer
47 views

change content div on layergroup change

I have two layers in a LayerGroup that I can toggle between and would like to update a control(bottom left in example) with the grades of the currently selected layer. How can I go about doing this in ...
1
vote
1answer
228 views

getActiveLayers for LeafletJS

I'd like to identify the layers that are currently active (which basemap is currently in view and which overlays are currently turned on). Was hoping to find something akin to getActiveLayers in the ...
0
votes
0answers
225 views

Leaflet + proj4js + EPSG:2180

I'm trying to add a WMS layer in EPSG:2180. I get the definition for EPSG:2180 from here and I am using this guide on GitHub to make a new CRS definition, but I think it is corrupted. It is not ...
2
votes
1answer
185 views

How does one use leaflet layergroups with CartoDB layers?

I'm trying to use leaflet layergroups with a cartodb layer, ala: http://leafletjs.com/reference.html#layergroup but haven't been able to successfully do it. This is what I have so far: var map = ...
4
votes
2answers
232 views

Editing PostGIS topology in a web browser

I am trying to conceptualize the best process for editing topology from PostGIS in a web browser. Ideally what I would like to accomplish is the loading of a topology (imagine the lower 48 states of ...
0
votes
1answer
97 views

OpenLayers/Leaflet render world borders

I am trying to show all world borders. Either using OpenLayers or Leaflet. World borders are taken from here. This code does not work. What I am doing wrong? var Map = { map: null, layer: null, ...
3
votes
1answer
701 views

Leaflet add and remove legends with layer selection

I'm new to Leaflet/Javascript and have been struggling to get legends a map to show only when a specific layer is selected from the layer control. I have three layers, one of which I would like to ...
1
vote
0answers
81 views

Geoserver WPS - Tiled Barnes Surface with geospatial index

I'm using Barnes Surface to compute a set of points from my PostgreSQL db. The problem is that my whole table is processed for each tile. I added a geospatial index on my points, how can I tell ...
1
vote
1answer
139 views

Opacity contrl for mapbox map with several layers

This is an example of how opacity can be changed for a Mapbox.JS map: https://www.mapbox.com/mapbox.js/example/v1.0.0/opacity/ The example shows only one layer used. With barely any experience in ...
0
votes
0answers
114 views

Looking for mobile web app map control that can handle layer redraw with good performance

I want to develop mobile web app to track GPS coords in real time (refresh every 10 seconds) from geoserver. Currently I have desktop site I wrote in ExtJS 4 and it works pretty well (Openlayers + ...
1
vote
0answers
125 views

Leaflet marker cluster by Administrative boundary

Is it possible to perform clustering based on administrative boundary using the leaflet.markercluster plugin? How would I do that? I already have the boundary layer.
0
votes
0answers
116 views

drag and drop csv file and display map using leaflet js

I am new in php and leaflet js. I want to drag and drop .csv file in php and using the values of csv file, I want to display map using leaflet js. Can any one help me.
2
votes
3answers
132 views

Integrate Leaflet map into PDF

I am current in the process of writing a thesis. Being in the field of GIS it obviously involves some maps ;). While the whole world switched to interactive online maps, Universities still require to ...
0
votes
0answers
65 views

Leaflet JS - Polyline and getPopup

I would like to get the popup that was bound to a polyline but it seems that unlike marler objects, polyline do not have such method. Any suggestion ? Also, it seems that the 'popupopen' event is ...
-1
votes
1answer
132 views

Leaflet Javascript: Layer Control Style in Internet Explorer Messed Up

[Update: Never mind. Got it. Will post the answer later. Thx] Please see this link: http://gisdev.clemson.edu/ffliestemp/ . Only in Internet Explorer the Layer's Control box/panel is expanded all ...
2
votes
1answer
218 views

Leaflet snap circle draw to marker

I am looking for ideas/libraries that enable snapping when I create a circle with leaflet draw. There is the libaray Leaflet snap, that enables snapping of draggable markers to polylines and other ...
0
votes
0answers
56 views

GeoJSON layer with local projection in Leaflet

I try to add a GeoJSON layer to my map in Lambert II projection. The GeoJSON contains few points. It don't work if the GeoJSON have more than 1 feature, but for 1 feature, it work ! I don't know why ...
2
votes
2answers
321 views

How to load big geo-data file into web application

I am building a web app where I show details in map. I load data using geojson file (190 mb). I was looking in different possibilities to show the data, here there are: Leaflet GeoJSon: it should ...
0
votes
2answers
76 views

Slippy map tile question and good practice

I have created a small slippy map (Leaflet) and have given it a bounding box. If the user tries to pan/slide outside the given bounds then the map bounces back. Also, the slippy map only has tiles ...
0
votes
1answer
1k views

How to add event listener to many markers on the map?

How can I add an event listener to many markers on the map? I know how to add an event listener to a single marker say: var marker = L.marker(...); marker.on('dragend',function(){...}); So, how can ...
2
votes
1answer
437 views

Leaflet center Marker AND Popup on Map viewport

I want center my marker on popup open.. and centering map not in marker latlng, but on center of marker and popup! The problem is that popup has dinamic content(loaded on click). The map size is full ...
1
vote
1answer
50 views

Query data without opening up database?

I have a bunch of polygon data that I want users to be able to sort/filter based on certain criteria. I have the data in a CartoDB table, and can pretty easily use some SQL calls to achieve what I ...
0
votes
0answers
50 views

How to use Leaflet CircleMarker with Leaflet Draw

I want to use the Leaflet CircleMarker function together with Leaflet Draw when a marker is put on the map. var drawControl = new L.Control.Draw({ draw: { marker: function ...
0
votes
1answer
834 views

Which are the Geojson css style properties for mapbox.js?

I try to style a LineString in a Mapbox Map through L.Geojson and all the style properties I could find are: fillColor, colour, weight, opacity. Does anyone know if there is something else? For ...
1
vote
0answers
247 views

Refresh leaflet marker data in place ? (on insert to sql db)

I have a form that sends data via ajax to be geocoded and inserted into a mysql db. Once that data is there, can I force the marker layer to refresh so that it displays the new data? The SQL API ...
0
votes
2answers
327 views

How to add a floating “crosshairs” icon above leaflet map?

While reading the article about MapBox's map utility to searching for flight MH370, I noticed that they have a stationary "floating" target (or crosshairs) icon that helps users identify the center of ...
3
votes
1answer
516 views

Does Leaflet.js uses WebGL for drawing on HTML5 canvas?

If someone could explain how does the Leaflet.js library draws object (and map layers) on HTML5 canvas? Does it uses WebGL and its GPU accelerated usage of physics and image processing in any way?
0
votes
1answer
63 views

Drop Marker with 3857 projection in leafletjs

Is it possible in leaflet to drop marker with 3857 projection on map? I fond a solution where first translate point to 4326 using proj4js and than drop it on map. var source = new ...
0
votes
0answers
106 views

set map center in leaflet with 3857 lat/lon

I'm trying to set map center with lat/lon of 3857 projection in leaflet. By using lat/lon of projection 4326 its working fine. var map = L.map('map', { crs: L.CRS.EPSG3857 ...
7
votes
2answers
556 views

Color-code a Leaflet polyline based on additional values, e.g. altitude, speed,

I'd like to draw a GPX-track on a Leaflet map. The polyline shouldn't have only one color, but I'd like to show certain values like altitude, speed, heart-rate, temperature, cadence, slope ...
1
vote
0answers
157 views

Leaflet toGeoJSON() keep leaflet_id

When I use the function .toGeoJSON(); is there way to keep the layer leaflet_id?
5
votes
6answers
2k views

3D perspective on maps in Leaflet, CartoDB?

Are there any JS library out there that would render normal, flat maps (like Leaflet) into a perspective map like this one, on the web: Also, anyone seen anything that could turn CartoDB data into ...
3
votes
1answer
1k views

Change default leaflet marker color

I'm using esri-leaflet, and leaflet inherently to add a point feature class (geojson) to a map. What is the best way to add and style the layer? I've see pointToLayer on the leafletjs.com, but don't ...
2
votes
0answers
140 views

Load Leaflet map in canvas element

I am working with leaflet tiles loading tiles to a map div http://jsfiddle.net/tBCd5/ I am now playing with some html5 canvas distortions like below http://jsfiddle.net/UF4PK/ It would be cool to ...
0
votes
1answer
958 views

Leaflet error: Uncaught TypeError: Cannot read property '_controlCorners'

I'm trying to implement the Leaflet choropleth example on a map I already built. I've followed the instructions and seen many implementations of the i.control and control hover option on Github but ...
4
votes
0answers
153 views

GeoJSON shape distorted on Leaflet.js spherical mercator WMS map [closed]

I have a map with a simple WMS layer in spherical mercator projection (rendered by a OSM-Mapnik-TileCache server stack, everything is in EPSG:900913 / EPSG:3857). First: I can't understand why, if ...
4
votes
1answer
239 views

Leaflet - Change style on click

I am beginer with Leaflet library and I am facing an issue with a geojson. I have an extern geojson file (points) and I would like to display a circle for each point coordinates and get a bigger ...
1
vote
1answer
144 views

Get bounding box of WMS

Is it possible to request the bounding box of a WMS from GeoServer? In my case I have a WMS that I show with L.TileLayer.WMS in a Leaflet map. I like to center and zoom my map to the WMS.
0
votes
0answers
150 views

Updating Mapbox map to newest API/getting markers to load

I'm new to the Mapbox API (and to Javascript in general), so please bear with me. I am trying to build an interactive map that automatically cycles through map markers as the user scrolls through ...
2
votes
1answer
187 views

Cache geodjango query with bounding box filter

Im using geodjango (postgis) to retrieve points contained inside a bounding box (made by leafletjs), it works so nice, but now I want to cache this query. A tipical query is one like this: ...
4
votes
1answer
120 views

four color theorem for QGIS 2.0 or Leaflet?

I recently looked at some other posts relating to this topic but as far as I can tell there is currently not a working plugin or script for QGIS 2.0 to achieve a four color theorem for styling polygon ...
1
vote
1answer
245 views

How does Leaflet layer ordering work with CartoDB layers?

All, I'm trying to figure out how Leaflet layer ordering works when you have layers coming from CartoDB. I have a map with 1 polygon layer (cartodb), 3 point layers (cartodb), 1 basemap layer ...
2
votes
1answer
446 views

OpenLayers3 vs Leaflet for styling multifeature geojson

I'm experimenting with various options for displaying geographic information to the public in html format. The ultimate aim is to build an online application where anyone can add the route they cycle ...
1
vote
1answer
219 views

Reprojecting in postGIS from 900913 to 4326. Wrong coordinates

I'm working with postGIS 2.1 I have a table called 'xacementos' created with the srid: 900913. I took the points coordinates from google maps and I want to convert them to SRID:4326 to show the points ...
2
votes
1answer
1k views

Make sidebar div active on Marker click (and vice versa)?

What's the best way to change an element to active when you click on a marker. For example, when you click on a marker on a Leaflet map, how to make it so the sidebar element that's related to it ...
0
votes
0answers
339 views

Leaflet - Tiles stopped loading. Can't figure out why

Suddenly my map stopped loading tiles and I went on the leaflet site and downloaded the latest version of everything. ...still I could only make London visible with its latitude and longitude. I have ...
4
votes
1answer
385 views

How to create leaflet legend for points

I have points like this in a leaflet map. The points come originally from a GeoJSON file and I used L.circleMarker to convert them to circles. How can I create a legend for these points? Based on ...