microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.21k stars 1.69k forks source link

Google map\navigation sdk use exception #2152

Open chengkai417 opened 7 months ago

chengkai417 commented 7 months ago

1、Why is the Mapbox map loaded when using Google Maps SDK? Do you use the map component of mapbox internally to replace it?

2、When I use the Google Navigation SDK, the map fails to load. Do you have any plans to adapt the navigation sdk? If adapted, would you also use mapbox?

sdk test version: maps sdk:com.google.android.gms:play-services-maps:18.1.0 navigation sdk:com.google.android.libraries.navigation:navigation:5.0.0 mircog os: https://calyxos.org/news/2021/05/27/emulator-images/

navigation_sdk maps_sdk

mar-v-in commented 7 months ago
  1. Yes. We previously used Mapbox to provide the Maps SDK, now changed to MapLibre.
  2. I haven't looked more into Navigation SDK yet. Can you please confirm the issue is the same with latest version of microG (should be available as an update in CalyxOS F-Droid), and if so, upload your test apk for others to reproduce? Thanks.
chengkai417 commented 7 months ago

app-debug.zip This is the test apk with Navigation SDK

You need to cooperate with Google to get more navigation sdk information refer: https://developers.google.com/maps/documentation/navigation/android-sdk

So you haven’t specifically adapted the Google Navigation SDK, right?

mar-v-in commented 7 months ago

I'm not aware of any code specifically written for Google Navigation SDK.

chengkai417 commented 7 months ago

Excuse me. Can Google Map be used as the base map of Map SDK? Instead of using the mapbox library? Is it possible to do it?

mar-v-in commented 7 months ago

No. Google doesn't provide an open source library to display map data (like the mapbox or maplibre libraries) nor does it provide an API to access the map data (like mapbox, maptiler or stadia). Extracting the map data directly, even if technically possible, would be a breach of their ToS and a copyright infringement, and would still require a lot of development work to actually render it.

Why would you want to do it? What's wrong with the current maplibre+stadia approach?

chengkai417 commented 7 months ago

Our system does not have GMS, but our application needs to access the Google Navigation SDK。My boss requires Google Maps when the base map is needed. If it is mapbox, we can just use mapboxs sdk directly.

mar-v-in commented 7 months ago

If you are developing an application that targets systems without GMS, then you can't have the native Google Maps base map. That's Google's rules, not mine.

It also seems irrational to require Google Maps. If OpenStreetMaps' data quality is not good enough in your target region and improving it is not feasible for you, you can still use any other commercial maps SDK that provides good quality maps for your target region (Bing, Here, TomTom, to just name a few).

You might be able to use a WebView and use Google Maps JavaScript SDK there to get a Google Map displayed, but performance won't be nearly as good and you'd be very limited in features.

None of this is related to microG though.

chengkai417 commented 7 months ago

Got it, thank you