2amigos / yii2-leaflet-extension

Yii 2 Extension library to display interactive maps with Leaflet .
http://yiiwheels.com
Other
30 stars 26 forks source link

modal window #29

Open nailfor opened 8 years ago

nailfor commented 8 years ago

I have a issue with the use of the widget bootstrap modal window When I call Ajax and get html code, the map is drawn wrong

I found a solution by making the setTimeout in my widget myMap extends Map

public function registerScript(){
...
$view->registerJs("function {$name}_init(){\n" . implode("\n", $js) . "}\nsetTimeout({$name}_init,100);");
}
ToRvaLDz commented 8 years ago

This solve the problem in every map that is hidden while created.

Nice solution thanks.

tonydspaniard commented 8 years ago

I'll think about adding delay option