The map won't support 100,000 markers very easily. Every time you want to zoom or pan the map its firing events and calling each of those 100,000 markers to re-draw/respond; it doesn't take too long but long enough as each marker must determine it's position by converting the lat,lng point into the new projection coordinates.
Unless there is a specific purpose for that many markers I would suggest some sort of clustering technique. Check out the links below: http://googlegeodevelopers.blogspot.com/2009/04/markerclusterer-solution-to-too-many.html http://groups.google.com/group/google-maps-api-for-flash/browse_thread/thread/52dc36c1a82ba119/6dc1c5dd9068a2cd?lnk=gst&q=Overlay+performance#6dc1c5dd9068a2cd It's possible there is a browser difference due to the how the Flash plug-in operates in each. Try downloading the newest version (Flash Player 10) and see if you can get similar performance between the browsers. -Arothian On May 14, 8:23 am, gani <[email protected]> wrote: > 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="120000" 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="120000" > ScriptRecursionLimit="12000" > > <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 For Flash" 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-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
