Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing map types #8

Closed
hardsoft opened this issue May 5, 2017 · 2 comments
Closed

Changing map types #8

hardsoft opened this issue May 5, 2017 · 2 comments
Labels

Comments

@hardsoft
Copy link

hardsoft commented May 5, 2017

When I build the example app it appears to be using google maps.

What changes do I need to make to use OSM map. Is there an example of this.

@Diolor Diolor added the question label May 6, 2017
@dmitry-zaitsev
Copy link
Contributor

The sample app is updated. Now it uses OSM maps by default.

To switch between map types, you need to do the following:

  • Change view type which you're using. There are MapView implementations for each map provider. See activity_main.xml.
  • Change MapsConfiguration to match the provider which you are using. For example, use com.car2go.maps.osm.MapsConfiguration for OSM and com.car2go.maps.google.MapsConfiguration for Google Maps.
  • The same way, change CameraUpdateFactory and BitmapDescriptorFactory.

@caopeng000
Copy link

能否动态设置使用哪个地图吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants