Op vrijdag 18 november 2016 11:22:51 UTC+1 schreef Tim Bezhashvyly:
>
> That's the issue. By the time load command is sent the HTML markup must be
> already present at the page.
>
I am not to familiar with Google maps integration, but it looks like the
actual update of the map in the DOM is
In any case, if you want to render a google map on button click, the setup
could be:
>
>- add a Msg called LoadButtonClicked or something, and add a button in
>your view which triggers this (with onClick)
>- in your update function, add a handler for LoadButtonClicked that
>
Have you seen this approach:
https://github.com/rtfeldman/elm-google-maps
?
On Fri, Nov 18, 2016 at 8:25 AM, Tim Bezhashvyly
wrote:
> Let's say I want to render a Google Map on a button click.
>
> To do so I first need to render a markup and then send a message which
Let's say I want to render a Google Map on a button click.
To do so I first need to render a markup and then send a message which will
trigger JavaScript through post with map data.
With "init" it would not be a problem as command passed to "init" is
executed after view is already there. But