Closed MichalMisiaszek closed 5 years ago
You could take a look at the ImageProvider that most TileProvider implementations are using to see if this could be exposed to MapController, but it's not clear to me exactly how that would work
This is an answer to 2nd or 1st question ? :)
that was more for the first question, I don't think we have an example of multiple tile layers being used, but it should be possible if the top layer is partially transparent.
Yea, I tried once with layer which suppose to be transparent but it was looking completely opaque, I will try again. For Map drawing, maybe you know better method ? I tried with hidden widgets but it did not work. I basically want to create image file from map with polylines etc ...
if you have a small demo it might be easier to debug what's going on, but under the hood we are just using a Stack widget with Positioned widgets. Here's the implementation: https://github.com/johnpryan/flutter_map/blob/master/lib/src/layer/tile_layer.dart#L427
I will create small demo app so we can find solution, thanks !
Hi John,
Plugin support multiple TileLayerOptions
the trick was to change default background to transparent ! ;) backgroundColor: Colors.transparent
It is not super fast but works. I have weather tiles on map tiles and it us usable.
Still to solve issue 1.
I'm going to close this - please file one issue at a time :)
Ok, I still do not have a solution to map ready event.
ok, I've created #377 to track that.
Hi John, Thanks again for great plugin. I have a question. I am calling
mapController.fitBounds
and then making screenshot of map widget usingRepaintBoundary
andFocusScope.of(context).requestFocus(FocusNode()); await _capturePng()
Unfortunately sometimes map tiles are not refreshed/downloaded or painted before I make screenshot leading to map with grey background. Any idea how I can wait for plugin to complete painting maps ? BTW. Can you have two tile layers (like overlay weather tiles on map) ? Thanks again.