简体   繁体   English

在Eclipse中的Android应用中导入开放的街道地图

[英]Import an open street map in android app in eclipse

I'm new to Android and to Open Street Maps. 我是Android和Open Street Map的新手。

I have exported an open street map named "map.osm". 我已经导出了名为“ map.osm”的开放式街道地图。

I'm using eclipse for andoid and I have included the following jar files: 我将eclipse用于Andoid,并且包含了以下jar文件:

  • osmdroid-android-3.0.10.jar osmdroid-Android的3.0.10.jar
  • slf4j-android-1.5.8.jar SLF4J-Android的1.5.8.jar

Now it's time to import the map.osm file. 现在是时候导入map.osm文件了。 Shall I use tiles in order to display the osm in android? 我是否要使用图块以在android中显示osm?

[I downloaded Maperitive and I created tiles in .png format] [我下载了Maperitive,并以.png格式创建了图块]

Can anyone elaborate on that? 有人可以详细说明吗? What type of file shall I import in eclipse? 我应该在eclipse中导入哪种文件?

  • map.osm [open street map file] or map.osm [打开街道地图文件]或
  • or tiles in png format? 或png格式的图块?

It's not clear to me the type of osm file I have to import in eclipse. 我不清楚我必须在eclipse中导入的osm文件的类型。

I would like the user to search specific items on the map eg 我希望用户在地图上搜索特定项目,例如

  • restaurants 餐馆
  • hotels 酒店
  • attractions 景点

Thanks 谢谢

Although I never used osmdroid you will very likely have to import the .osm file, either additionally (if you want to use your tiles for drawing maps) or exclusively (if you want to render vector maps). 尽管我从未使用过osmdroid,但您很有可能必须导入.osm文件,或者另外(如果要使用图块来绘制地图)或.osm (如果要渲染矢量图)。 Tiles are just raster images without any metadata. 切片只是没有任何元数据的光栅图像。 If you need POIs, addresses, streets, cities, opening hours and so on then your application will need the .osm file. 如果您需要POI,地址,街道,城市,营业时间等,那么您的应用程序将需要.osm文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM