refresh the map Ol3 (Openlayers3)

المشرف العام

Administrator
طاقم الإدارة
Hello I'm using ol3 in a mobile hybrid application using sencha touch2 , so I start by drawing a polygon inside a map , after validating this drawing I redirect the user to an other form in order to fill the alphanumeric informations of that polygon , My problem is when I want to get back to my map the layers disappear and the only way to make them get back is to change the device Orientation. so I'm looking for code snippet that can reload (refresh) my layers or the whole map

I tried map.dispatchChangeEvent();

or vectorSource.dispatchChangeEvent();

but nothing works for me

..... I appreciate your support on this, thanks in advance.....

Edit : I find the solution is to update the map size like this : map.updateSize();

I



أكثر...
 
أعلى