如何在露天街道地图中显示警察局,餐厅等附近的地方。我正在使用this库在我的Android应用程序中集成开放街道地图。我整合这个库的方式是
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Context ctx = getApplicationContext();
//important! set your user agent to prevent getting banned from the osm servers
Configuration.getInstance().load(ctx, PreferenceManager.getDefaultSharedPreferences(ctx));
setContentView(R.layout.activity_main);
MapView map = (MapView) findViewById(R.id.map);
map.setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE);
map.setUseDataConnection(true);
map.setBuiltInZoomControls(true);
map.setMultiTouchControls(true);
IMapController mapController = map.getController();
mapController.setZoom(14);
GeoPoint startPoint = new GeoPoint(48.8583, 2.2944);
mapController.setCenter(startPoint);
}
答案 0 :(得分:2)
您可以使用osmbonuspack通过OverpassAPIProvider下载附近的POI。要确定要下载哪些POI,请查看OSM的map features和相应的keys,例如 amenity , shop ,休闲等等。