mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
275 stars 107 forks source link

how to add Raster source along with basic auth #431

Open wasdee opened 6 months ago

wasdee commented 6 months ago

sometime rastersource WMS is behind some auth. basic auth is a common one.

I don't see any example to do this. not in docs, source code, test.

Closest

https://github.com/mapbox/mapbox-maps-flutter/blob/e3f17cdf9afb463c048842712f584d26b82845d2/example/integration_test/style/layer/raster_layer_test.dart#L19C1-L24C9

What is basic auth like

on js lib, we use transformRequest i don't know if we have api to do the same thing.

wasdee commented 6 months ago

in order to intercept we might need to add HTTPInterceptor at swift, kt, kotlin level init(

private fun changeUserAgent(version: String) {

marcel-ploch-coodoo commented 3 months ago

Are there any news on that topic. I couldn't find the code anymore in the current main branch.