openstreetmap

Successive markers with navigator.geolocation.watchPosition

你。 提交于 2019-12-25 02:46:40
问题 I use Leaflet and OpenStreetMap. In addition, I send geolocation data with socket.io in nodejs. The position of the user is displayed successfully with the code: navigator.geolocation.getCurrentPosition(.........) Now I want the position of the user is updated on the map every X seconds. So I replaced the code: navigator.geolocation.watchPosition(.........) My problem is that a new marker is added geolocation every X seconds, and the oldest markers are not removed. Could someone help me

OSMDroid Routing problems when following a tutorial

血红的双手。 提交于 2019-12-24 16:52:34
问题 I utilise the following code to put a route overlay onto an OSM droid map, using code gotten from the following tutorial (http://code.google.com/p/osmbonuspack/wiki/Tutorial_1) but slightly tweaked into a custom method, rather than being used in the OnCrerate method. Now this does route and produces a green overlay on the map. However, there is a problem exhibited from the For Loop onwards. This is because road.mNodes is always size zero indicating that no instructions are coming down.

How to update popup content using MarkerCluster with leaflet

主宰稳场 提交于 2019-12-24 08:47:15
问题 I'm trying to show a map with lot of markers on it (~36.000) that have to contains some informations. First, I SELECT elements from a database, then I encode it in JSON array with PHP, then I get it with JSS and finally I add it to my map, and set the content of the popup with the data in the JSON array. The problem is that there are so much data that PHP throws Fatal error: Allowed memory size of 134217728 bytes exhausted . What I think I can do to overpass this is to make a SQL request for

leaflet - count number of requests sent by leaflet to osm (openstreetmap)

你。 提交于 2019-12-24 07:22:05
问题 I'm using leaflet.js for a project. Leaflet sends requests to open street map (osm) tile server to get its tiles. As these requests are sent directly from the client, I have a hard time finding about the requests on my server. Question: Is there a way to find out the number of requests sent by leaflet to the tile servers at osm? (I was not able to find any $.ajax / $.get / $.post in leaflet.js!) 回答1: Please note that $.ajax / $.get / $.post are methods from jQuery. Leaflet does not depend on

How to get onTap in Polygon in osmdroid?

久未见 提交于 2019-12-24 05:17:33
问题 I have lot's of polygon drawn. Some of which overlaps. I want to be able to detect a tap inside the polygon and display a dialog saying it was clicked inside the polygon (this polygon should be detected on tap). This kind of property can be seen with ItemizedIconOverlay where we can detect all of the OverlayItem with the tap on the OverlayItem. How to implement this on polygon? The way I draw and add Polygon is: MyPolygon myNewPolygon = new MyPolygon(this); myPolygon.setPoints(Polygon

R: Unusual error plotting multipolygons with ggplot, geom_sf, and openstreetmap

自古美人都是妖i 提交于 2019-12-23 22:01:28
问题 I am trying to plot Lake Geneva/Lac Leman using {ggplot2}, {osmdata} and {sf}. I am getting an error whenever I try to plot the lake multipolygons (of which there are 5). I can't find any mention of this error elsewhere. library(osmdata) #> Data (c) OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright library(tidyverse) lake_gva <- getbb("Geneva") %>% opq()%>% add_osm_feature(key = "natural", value = "water") %>% osmdata_sf() lake_gva #> Object of class 'osmdata' with:

HTTPError: HTTP Error 403: urlib3 while using smopy

假如想象 提交于 2019-12-23 20:45:12
问题 I'm trying to generate an osm map while using smopy but I keep getting the forbidden error, this is the set of the code : box = (lat[region].min(), lon[region].min(), lat[region].max(), lon[region].max()) m = smopy.Map(box, z=12) m.show_ipython() and then I get the following error : HTTPError Traceback (most recent call last) <ipython-input-48-1060c6eba6aa> in <module> 1 box = (lat[region].min(), lon[region].min(), 2 lat[region].max(), lon[region].max()) ----> 3 m = smopy.Map(box, z=12) 4 m

Leaflet flipping tiles in electron

家住魔仙堡 提交于 2019-12-23 17:04:06
问题 Hey im new to electron but i want to use Leaflet inside it to some magic mapping stuff. I created an basic electron application with the index.js according to the basic example. I added also an basic index.hetml: <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <div id="map"></div> </body> <script> require('./renderer') </script> </html> And the Leaflet stuff inside the renderer.js window.L = require('leaflet') var map = L.map('map').setView([51.0420175, 13.7358889], 12)

Overpass API dispatcher fails with Address already in use 98

一笑奈何 提交于 2019-12-23 12:49:14
问题 I've followed the installation instructions on: http://wiki.openstreetmap.org/wiki/Overpass_API/install Initially everything worked flawless, but I would like to try and use my own custom map, BUT when I killed the dispatcher process nothing works. This is with the original database and not my custom map. I tried to clean everything and install from scratch, this also worked flawless, but a simple kill on the dispatcher make everything crash from there on. I currently get the error message

How can I find road speed limit in open street map

北城以北 提交于 2019-12-23 03:28:14
问题 How can I find road speed limit in open street map? I am using open street map OverPass API . I have used following query to find bus stop. <query type="node"> <has-kv k="highway" v="bus_stop"/> <has-kv k="name" v="Lichtscheid"/> </query> <query type="node"> <around radius="1000"/> <has-kv k="highway" v="bus_stop"/> </query> <print/> But I need road Speed Limit. 回答1: Elements in OpenStreetMap are described by tags. For speed limits the maxspeed tag is used as already noted in tyr's comment.