I was trying to use the Google Maps API V3 in my new Windows 8 Application. It works fine but when there is no internet connectivity and I try to Zoom-In and Zoom-Out it says “Sorry, we have no image here.” which is fine but when I try to Zoom-In and Zoom-Out too much it ends my App unexpectedly saying that “0x800a138f – JavaScript runtime error: Unable to get property ‘length’ of undefined or null reference”.
I tried a lot but didn’t found any solution. Also when I do the same in chrome all works fine but IE9 also freezes when I try to do the same by loading a simple google map in it.
I just don’t want my App to get terminated unexpectedly. What shall I do?
Any help will be appreciated…
There is a property navigator.onLine . You may detect it and decide whether to draw the map or not.
When the map is already drawn you may check this property in intervals and disable any interaction e.g. by covering the complete map with an overlay when the network-connection has been lost