Closed Xennis closed 4 years ago
hey @Xennis , i just used your attribution, thank you for sharing. I noticed that by zooming the map the attribution seem to be moving too ? sometimes you would see it and other it would just not be there. Do you know how i can fix it ? thank you
Hi @an99990 back than I didn't have this issue. But flutter_map changed a lot in between. One guess out of the blue: not the zooming is the issue but the rotation. You can define these days layers as non-rotatable.
hi again @Xennis , like you said it was the rotation. Thank you for the super fast answer. Happy new year to you !
here is the fix :
nonRotatedLayers: [
AttributionOptions(),]
I could find nowhere a good example for a good looking attribution. That's why I want to share my solution to enable others because correct attribution is a crucial part when using OSM and tile providers:
The logo is in the left corner with the "i" icon. On click this alert dialog opens. This is close to the Mabbox Android SDK attribution. The code
The attribution plugin that uses the packages
flutter_svg
(the SVG itself can be found on the linked page above) andurl_launcher
:Usage
Probably someone will ask:
I've no intention to create a proper plugin for that. I my eyes that simply does make sense because the attribution is so different from tile provider to tile provider. Also within the same tile provider it differs; for example for Mapbox there a case were additional attributions for telemetry and satellite images are needed. You maybe want to translate or not translate the text, maybe place it some other corner, ... Basically the common thing is: "Put some widget somewhere". What would be 3 lines of code. Instead of maintaining these in an extra plugin with all the overhead it probably makes more sense to enhance flutter_map to take a Widget in the MapOptions.
Like mentioned above, I only wanted to share the example. The issue can be closed.