-
Notifications
You must be signed in to change notification settings - Fork 189
how to customize ? #48
Comments
That would really be nice. |
If you want an in-line map or custom widgets overlaying the map, consider using https:/apptreesoftware/flutter_map instead. If that doesn't work for your use case, let us know- we are always looking for feedback! |
Would it be suitable for a production app? I can see there would be the need to choose between different tile providers. |
Custom marker info/titles would be a good addition. For example, the ability to render a widget as info instead of simple title strings. Would allow for interesting custom information piped in about a marker/place when selected. |
custom markers and a little customization of the toolbar would be a great addition to this widget. I'm glad to see other users think the same |
I'm not experienced in Kotlin, so I'll just throw this idea out there to see what everyone thinks. What if a custom info window was implemented? I did some digging and found that the customization likely has to do with configurations of the google libraries. For example, a custom InfoWindowAdapter could be implemented and then in the onMapReady overridden function in the MapActivity.kt file, a call could be made to set the GoogleMap object with a custom InfoWindowAdapter as such GoogleMap.setInfoWindowAdapter(). The custom window adaptor could be as simple as rendering a textview that takes a HTML string. This would allow flexibility on behalf of the Flutter developer to pass in a more customized text rather than a simple string. Thoughts? Maybe something like this for the custom info window class:
A simple layout file added: `
` And then adding this line to the onMapReady function of the MapActivity Class:
|
FYI, I added a pull request associated with the above comment. |
@nitneuq33000 You can get a bitmap and then pass it into the MarkerOptions instead of the defaultMarker as such: Getting a marker bitmap:
Customizing the MarkerOptions passed in when adding a marker:
Adding the marker with custom marker options:
Of course, I just use the launcher icon as an example, you can use whatever you need. I believe you could also render an xml file as bitmap and then pass that in. I didn't implement for my use case, but I'm sure it's possible. Hope this helps. |
This seems really interesting! @bstuddard hope it can get implemented into the library officially, also with iOS support. Thanks a lot for you contribution! |
@bstuddard thanks for your contribution ! |
I have been looking at the plugin suggested by jhonpryan above. I have to say that it actually answers to many of the issues presented here. It's more customizable and I might say even kinda easier to use. |
We have no plans to support further customization in this library unless the community wants to contribute it. All of our dev focus is on the library that @johnpryan mentioned: https:/apptreesoftware/flutter_map |
hello there is way to customize the toolbar in map_view? or add widgets (floatingactionbutton).
example :
currently map_view opens a new window full screen with a slide to the left with a black toolbar. I would like to customize the page transistion , color toolbar and add widgets to interact without having to go back.
Finally, it would not be possible to have the dynamic map in a pop up box instead of a full screen, or in a card ?
thank you
The text was updated successfully, but these errors were encountered: