openstreetmap

Open OSM pbf results in Protobuf exception

馋奶兔 提交于 2020-01-15 03:16:07
问题 Using OSMSharp I am having trouble to open a stream for a file (which I can provide on demand) The error occurs in PBFReader (line 104) using (var tmp = new LimitedStream(_stream, length)) { header = _runtimeTypeModel.Deserialize(tmp, null, _blockHeaderType) as BlobHeader; } and states: "ProtoBuf.ProtoException: 'Invalid field in source data: 0'" which might mean different things as I have read in this SO question. The file opens and is visualized with QGis so is not corrupt in my opinion.

Google maps satellite view

跟風遠走 提交于 2020-01-13 06:44:07
问题 I'm using the google maps API with openstreetmap (see the following example code), I'd like to add the google satellite view too. How can this be accomplished? var tilesMapnik = new GTileLayer(copyOSM, 1, 17, {tileUrlTemplate: 'http://tile.openstreetmap.org/{Z}/{X}/{Y}.png'}); var mapMapnik = new GMapType([tilesMapnik],G_NORMAL_MAP.getProjection(), "îôä"); map = new GMap2(document.getElementById("map_canvas"), { mapTypes: [mapMapnik] }); map.setCenter(new GLatLng(32.08, 34.82), 12); map

Easiest way to create mbtiles files of Openstreetmap extracts?

ぐ巨炮叔叔 提交于 2020-01-13 03:21:10
问题 I'm creating an iPhone travel app that uses online as well as offline maps. For the offline maps I want to allow users to download an mbtiles file of the area they are interested in (e.g. London). The map should have information such as roads etc.. that are already found in OpenStreetmap. I'm aware of web sites such as http://metro.teczno.com/ for downloading Openstreetmap extracts. What is the easiest way to create mbtiles files of Openstreetmap extracts? Note: no map customization is needed

Showing an offline OSM map file. Suggestion: an MB Tiles file with Js.library

不打扰是莪最后的温柔 提交于 2020-01-12 23:51:12
问题 When online access to the internet is not possible, I would like the (offline) HTML5 app show an OSM map via an OSM file. Can you give an example of how I can show in an offline Html5 app OSM tiles that are loaded from an offline OSM map file like Mapsforge / Geofabrik etc? Example: via the openstreetmap.org I first exported a small part of a map. How can I show this downloaded OSM map in the Html5 offline webapp. 回答1: Yes, it's possible to do this in Leaflet, or any other mapping library.

how to add more marker in osm map in android

。_饼干妹妹 提交于 2020-01-11 10:52:46
问题 I've found a solution how to map balloon in openstreet map I customize osmbonuspack according to my need is work fine but is only show one map. How do I add more then one marker in this code which I paste below? My output URL is work fine just tell me how do I add text in image bubble and also how I add more then one marker in map? import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.osmbonuspackdemo.R; public

get speed limits from OpenStreetMap

孤街浪徒 提交于 2020-01-10 10:07:34
问题 I'm creating a mobile app that determines if someone if a good driver. The phone sits on the dashboard and collects GPS information while the user is driving. I need to determine a way if the driver is following the speed limit, and I would like to do this via OpenStreetMap. What is the best way to get speed limits from OpenStreetMap? 回答1: You can make a Web request to get your answer. Here is one (try it as a browser URL) of a small box where you're supposed to be: www.overpass-api.de/api

get speed limits from OpenStreetMap

不羁的心 提交于 2020-01-10 10:06:25
问题 I'm creating a mobile app that determines if someone if a good driver. The phone sits on the dashboard and collects GPS information while the user is driving. I need to determine a way if the driver is following the speed limit, and I would like to do this via OpenStreetMap. What is the best way to get speed limits from OpenStreetMap? 回答1: You can make a Web request to get your answer. Here is one (try it as a browser URL) of a small box where you're supposed to be: www.overpass-api.de/api

How to query OSM from the server

家住魔仙堡 提交于 2020-01-07 03:06:10
问题 Is there any way to connect to the web server of OpenStreetMap? I want to receive the speed limit information given a geoLoc "lat and Lon". I thought of solving this issue by creating a huge database encompases the node's lat and lon and the speed limit and then query the speed limit given a specific geoLoc. but now i am wondering is it possible to connect directly the OSM server and query the speed limit given a specific geoLoc?! whic approach is more efficient? 回答1: You can use Overpass API

How to query OSM from the server

ぃ、小莉子 提交于 2020-01-07 03:06:06
问题 Is there any way to connect to the web server of OpenStreetMap? I want to receive the speed limit information given a geoLoc "lat and Lon". I thought of solving this issue by creating a huge database encompases the node's lat and lon and the speed limit and then query the speed limit given a specific geoLoc. but now i am wondering is it possible to connect directly the OSM server and query the speed limit given a specific geoLoc?! whic approach is more efficient? 回答1: You can use Overpass API

Overpass API - URL fetching, not working on iPhone, working on mac

回眸只為那壹抹淺笑 提交于 2020-01-06 14:58:12
问题 I've got this problem last time i did some coding in my project, and i just can't seem to find where the error should be located. When i try the URL in the browser on my mac, everything is working fine - and i get the json file displayed. My code is as following: NSURL *url = [NSURL URLWithString:@"http://www.overpass-api.de/api/interpreter?data=[out:json];(way(around:150,49.4873181,8.4710548)[\"maxspeed\"];);out body;>;out skel;"]; NSMutableURLRequest *request = [NSMutableURLRequest