I am trying to write an app, that uses google maps via Maps Javascript API, which continuously watches the geoLocation. The app uses the initMap() function which loads the Google map.
Inside initMap() I called a function to initialise an interval which calls getCurrentPostion which then update the marker (geoLocation) on the map every says 12 seconds.
Now, I want to call a bottomUpModal when I clicked the marker.
My problem is that the bottomUpModal (which is a div that is normally not shown on screens) does not appear.
I am calling the bottomUpModal with the following codes:
marker.addListener( "click", () => {
loadBottomUpModal( marker.getLabel() )
});
which is inside another function called addMarker().
When I call the bottomUpModal from initMap, it does appear on screen but when called from functions that are deep inside other functions it does not appear.
I can see from the console log( "modal called" ) inside the loadBottomUpModal( ) that the function has executed, but no modal on display.
Can someone point me in the right direction.