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

Most demos crash due to not finding Streets layer #62

Open
ahmedre opened this issue Aug 23, 2024 · 3 comments
Open

Most demos crash due to not finding Streets layer #62

ahmedre opened this issue Aug 23, 2024 · 3 comments

Comments

@ahmedre
Copy link
Contributor

ahmedre commented Aug 23, 2024

When I run the demo (after setting maptilerApiKey in local.properties), the vast majority of the samples in the sample app fail with this exception:

FATAL EXCEPTION: main
Process: org.maplibre.android.plugins.testapp, PID: 14496
java.lang.IllegalArgumentException: Could not find layer Streets
  at org.maplibre.android.maps.Style.getPredefinedStyle(Style.java:1430)
  at org.maplibre.android.plugins.testapp.activity.annotation.CircleActivity.lambda$onCreate$4$org-maplibre-android-plugins-testapp-activity-annotation-CircleActivity(CircleActivity.java:48)
  at org.maplibre.android.plugins.testapp.activity.annotation.CircleActivity$$ExternalSyntheticLambda4.onMapReady(Unknown Source:4)
  at org.maplibre.android.maps.MapView$MapCallback.onMapReady(MapView.java:1324)

if I instead edit PluginApplication and update:

  MapLibre.getInstance(this)

to

  MapLibre.getInstance(this, BuildConfig.MAPTILER_API_KEY, WellKnownTileServer.MapTiler)

many of the demos work, (though others crash still with the same exception with layer Outdoors instead of Streets). Is there any piece of setup I am missing here?

Also, is mapbox_access_token actually used? I set it, but I don't see anything in the code that reads it (neither in this repo nor in maplibre-native, minus some of their sample code).

Thanks!

@louwers
Copy link
Collaborator

louwers commented Oct 17, 2024

We should replace the predefined styles with something like OpenFreeMap or Protomaps.

@ravenfeld
Copy link
Contributor

@ahmedre The example has been updated.

@ahmedre
Copy link
Contributor Author

ahmedre commented Oct 28, 2024

thank you! 🎉

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

No branches or pull requests

3 participants