Skip to content
Advertisement

Location Marke disappears when closing modal

I do not speak English, sorry for the mistakes.

I’m using bootstrap, jquery, propeller.in and

https://github.com/ChadKillingsworth/geolocation-marker

I have the following code

JavaScript
JavaScript

The problem is that the map does not load inside the div, if I put out the modal content it works normally, I would like to find out how the map can be loaded inside a modal, with examples using what I already have

Advertisement

Answer

You need to bind the event shown.bs.modal to execute the initialize function:

JavaScript

And change the dimension of your div to something fixed. For this example, I’m setting 300px x 300px.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement