Hi, I am using google maps api for flash. While overlaying large number of markers, am getting script time limit error(Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.). I am using flex builder IDE. I have set the scriptTimeLimit="120" and it is working fine in moxilla browser, but not working in ie6 and ie7. Please do reply. Thanks in advance:) I have pasted the code below:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:maps="com.google.maps.*" layout="absolute" width="100%" height="100%" viewSourceURL="srcview/index.html" scriptTimeLimit="120" > <mx:Panel title="Google Maps API for Flash Demo" width="100%" height="100%"> <maps:Map id="map" key="ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS- iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g" mapevent_mapready="onMapReady(event)" width="100%" height="100%"/> </mx:Panel> <mx:Script> <![CDATA[ import com.google.maps.MapEvent; import com.google.maps.Map; import com.google.maps.overlays.Marker; import com.google.maps.MapType; import com.google.maps.LatLng; import com.google.maps.LatLngBounds; private function onMapReady(event:Event):void { map.setCenter(new LatLng(37.4419, -122.1419), 13, MapType.NORMAL_MAP_TYPE); var bounds:LatLngBounds = map.getLatLngBounds(); var southWest:LatLng = bounds.getSouthWest(); var northEast:LatLng = bounds.getNorthEast(); var lngSpan:Number = northEast.lng() - southWest.lng(); var latSpan:Number = northEast.lat() - southWest.lat(); for (var i:int = 0; i < 100000; i++) { var newLat:Number = southWest.lat() + (latSpan * Math.random()); var newLng:Number = southWest.lng() + (lngSpan * Math.random()); var latlng:LatLng = new LatLng(newLat, newLng); map.addOverlay(new Marker(latlng)); } } ]]> </mx:Script> </mx:Application> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
