openstreetmap

'Expected String or Unicode' when reading JSON with Pandas

倾然丶 夕夏残阳落幕 提交于 2019-12-07 03:32:22
问题 I try to read an Openstreetmaps API output JSON string, which is valid. I am using following code: import pandas as pd import requests # Links unten minLat = 50.9549 minLon = 13.55232 # Rechts oben maxLat = 51.1390 maxLon = 13.89873 osmrequest = {'data': '[out:json][timeout:25];(node["highway"="bus_stop"](%s,%s,%s,%s););out body;>;out skel qt;' % (minLat, minLon, maxLat, maxLon)} osmurl = 'http://overpass-api.de/api/interpreter' osm = requests.get(osmurl, params=osmrequest) osmdata = osm.json

zoom mapView to a certain bounding box on osmdroid

柔情痞子 提交于 2019-12-07 03:27:21
问题 I want to use the zoomToBoundingBox method to zoom a map to a specific bounding box. The method does nothing but display the map on zoom level 0. In the mapView.java source code I found this: /** * Zoom the map to enclose the specified bounding box, as closely as possible. * Must be called after display layout is complete, or screen dimensions are not known, and * will always zoom to center of zoom level 0. * Suggestion: Check getScreenRect(null).getHeight() > 0 */ I checked getScreenRect

Detect if the OSM Mapview is still loading or not in android

别说谁变了你拦得住时间么 提交于 2019-12-07 02:50:51
问题 I have included Open Street Maps in my android application. In the mapview, user should be able to capture the screen after the map is fully loaded. But currently user can capture the image even when the mapview is still loading. Can someone tell me how to detect when the mapview is fully loaded? Below is my code to load the mapview: public class MainActivity extends Activity { MapView mapView; MyLocationOverlay myLocationOverlay = null; ArrayList<OverlayItem> anotherOverlayItemArray;

How to get the Lat, Long of a clicked location using leaflet Api

馋奶兔 提交于 2019-12-06 22:51:34
问题 I am using OSM with leaflet API. Now I want to get the lat and long of a clicked location. I meant something similar to this: http://openlayers.org/dev/examples/click.html map.events.register("click", map, function(e) { var position = map.getLonLatFromPixel(e.xy); alert("Lat, Lon : "+position.lon.toFixed(3),position.lat.toFixed(3)); }); This code in open layers helps to get the lat,long values - looking for something similar using leaflet. Any help would be really great. Thanks in advance 回答1

Having trouble connecting to OpenStreetMap

﹥>﹥吖頭↗ 提交于 2019-12-06 15:39:20
I have recently delved into playing around with the OpenStreetMap package but I cant seem to be able to download tiles eg conf.map = openmap(c(60,-90),c(-45,45),type="osm") will give me this error Could not open Bing aerials attribution metadata. failed loading 3/2/2 Connection timed out: connect I am not sure if this is a port issue as it is not my PC or if it is an issue with OSM but I couldn't find a solution anywhere and couldn't even find the port OSM uses to download map tiles. If anyone has any ideas as to why this is happening that would be awesome!! 来源: https://stackoverflow.com

OpenLayer/OpenStreetMap Hike&Bike Map

回眸只為那壹抹淺笑 提交于 2019-12-06 13:55:40
问题 In my SPA i want to inlcude openstreetmap via OpenLayer per JavaScript. This works fine. But how can i change the map type to the Hike&Bike Map like here: http://hikebikemap.de/ ? currently i am using the following code: var zoom = 11; var fromProjection = new OpenLayers.Projection('EPSG:4326'); var toProjection = new OpenLayers.Projection('EPSG:900913'); var markers = new OpenLayers.Layer.Markers( 'Markers' ); var map = new OpenLayers.Map(); var mapnik = new OpenLayers.Layer.OSM(); map

react-map-gl without API key using osm tiles

久未见 提交于 2019-12-06 11:15:38
问题 Is it possible? This tells me it is, but dont know why it defines and API key. but I cannot get it to work with react-map-gl StaticMap class. The property I can see from that class is just mapStyle which would take a standard Mapbox vector tiles path/name. Does it take an object? My code does not give me an error or show the tiles I request. <DeckGL> <StaticMap mapStyle= {{ "version": 7, "sources": { "simple-tiles": { "type": "raster", "tiles":["http://a.tile.openstreetmap.org/{z}/{x}/{y}.png

Map Highlight Odd/Even Side of Street

夙愿已清 提交于 2019-12-06 10:08:24
I have two coordinates of a street. Either both Odd or Even. So for example 15 ABC Street and 77 ABC Street (with their reverse geocode). I'm trying to draw a path line that is near the sidewalk. I used google maps api and did not find a way to do it. The directions api draws a line in the middle of the road, and I cannot find a way to do a geometric translation to either side of the street. I don't mind using any other API as long as I can solve the problem. 来源: https://stackoverflow.com/questions/33886715/map-highlight-odd-even-side-of-street

Why MKTileOverlay repeats same tile over and over for openstreet map in ios, swift4

百般思念 提交于 2019-12-06 09:26:19
问题 I'm using OpenStreet map to with our own map server with iOS. for iOS I couldn't find any third party library (free or paid) which can use with our open StreetMap server. then I decided to go with MKMapView using MKTileOverlay like below : added a MapKit outlet to my storyboard. made a outlet connection and set delegates to self using storyboard and then here is my viewdidload method. let urltemplate = "http://tile.openstreetmap.org/17/94621/62995.png" let overlay = MKTileOverlay(urlTemplate:

Address geolocation on own server

﹥>﹥吖頭↗ 提交于 2019-12-06 08:42:32
Disclaimer: Any API is NO OPTION for me because of the vast amounts of places I want to process. I know there are plenty of services out there but I'd like to have my own solution Ok, after this is said here my question :) There are platforms like OpenStreetMap and maybe others who are doing very well in bringing the world of maps into the open source community. What I need I have an address located anywhere in the world and I want to compute the latitude and longitude, elevation would be nice but doesn't really matter. I've seen plenty of solutions offered around OpenStreetMap to generate