-
Notifications
You must be signed in to change notification settings - Fork 65
Description
Right now, the plugin deliberately renders map instances below the webview. This allows for overlaying the map with anything that's in the webview. This way it is possible to customize the map with custom-made HTMLElements like a "to my location"-button for example. Also this allows for use-cases, where you can show full-fledged HTMLElements - like cards - on top of the map, when you click a marker for example.
As can be read in the Should you use this plugin? section of the documentation, the main use-case of this plugin is for apps which main focus is the map:
If your app revolves mainly around a Map, like for example Uber or Lime, this plugin is probably a good fit for your concept.
However, this approach actually makes it more difficult for developers with "simple" use-cases to implement this plugin. For example in issue #154, a developer mentioned he'd like to use this plugin in a modal. As said before, those type of use-cases are not the main focus of this plugin.
Right now a developer would need to make every element (including the modal) transparent to make the map visible. This can be sub-optimal in certain scenarios. Especially when utilizing a modal.
We'd like to add a feature that makes it easier to utilize this plugin in similar scenarios. We will be doing that by adding a renderOnTopOfWebView
(or something similarly named) parameter to the createMap
method. When this parameter is set to true
, the map instance will (as its named suggests) on top of the webview, instead of behind it. That way it is not needed anymore to make all kinds of HTMLElement transparent.
Of course this has the drawback that all advantages that come with rendering behind the webview, are not applicable for that specific map instance. So we will need to document this option clearly, so that a developer can make a rational decision between the two types of rendering.