Reputation: 207
I'm trying to make an android app using osmdroid that will have a satellite view. I need Bing Maps to be able to do this. I have the app working with Mapquest road maps but I'm running into a small error. I need to call the method
BingMapTileSource.initMetaData(this);
but I am getting the error "initMetaData() has private access in 'org.osmdroid.tileprovider.tilesource.bing.BingMapTileSource'. How can I fix this?
Upvotes: 0
Views: 331
Reputation: 3258
According to the wiki https://github.com/osmdroid/osmdroid/wiki/Map-Sources
Under manifest/application
<meta-data android:name="BING_KEY" android:value="YOUR KEY" />
Code Sample:
//load from manifest
org.osmdroid.tileprovider.tilesource.bing.BingMapTileSource.retrieveBingKey(this);
//or load programmatically
org.osmdroid.tileprovider.tilesource.bing.BingMapTileSource.setBingKey("YOUR KEY");
org.osmdroid.tileprovider.tilesource.bing.BingMapTileSource bing=new org.osmdroid.tileprovider.tilesource.bing.BingMapTileSource(null);
mapView.setTileSource(bing);
Upvotes: 1