-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Unable to integrate Ola Maps (Recently Released) #415
Comments
The styleURL has to go through the same transformation similar to the condition block .. that will ensure the other pre-appended params are treated well. |
@tenhtof |
You are close. When supplying Ola map URL to the
You may also refer to this page which has similar implementation - https://github.com/tofables/poc.olamaps/blob/main/src/App.js |
@tenhtof but we don't have transformRequest props for MapView component |
You need transformRequest to handle this. Just use React useState or useMemo to add the api_key?
Or, you know, just include the api_key in the styleUrl prop:
|
@tyrauber tried this. Not working. |
Sorry, @dsardar099, You are correct. You do need transformRequest in order to pass the api-key to the tile server. Unfortunately, that function doesn't exist. Let's close this in favor of ticket #424. In the meantime, the best you can do is copy the content of the style.json from the server, add it to your rn app, and update it to include the api-key, and then pass the json to the styleJSON prop. |
Thanks @tyrauber. I will do that for now. |
Unable to integrate Ola Maps.
Using React Native Expo.
When using https://demotiles.maplibre.org/style.json as styleUrl, everything is working fine.
Error from console-
MapLibre error {mous.myproj}[Setup]: loading style failed: HTTP status code 401 {"level": "error", "message": "{mous.myproj}[Setup]: loading style failed: HTTP status code 401", "tag": "Mbgl"}
INFO URL http://192.168.29.132:8081/symbolicate
The text was updated successfully, but these errors were encountered: