http://www.windalert.com/en-us/Search/ViewResults.aspx?m=Forecast#27.905,-80.477
This url above loads our flex application and does a search, returns
spots and weather data for a given location (lat lon in this case).
>From there a few things that are happening that im really stuck on.
1. we are averaging 316 page requests in some cases
2. when google maps loads, we have some custom map types that are
created:
public function createMaps():void{
_mapWFx = new MapType([ new HighContrastTile()],
MapType.NORMAL_MAP_TYPE.getProjection(), MapTypeEvent.MAPTYPE_WFX,
_mapTypeOptions);
map.addMapType(_mapWFx);
_mapNormal = new
MapType([MapType.NORMAL_MAP_TYPE.getTileLayers()
[0], new SpotDotTile() ], MapType.NORMAL_MAP_TYPE.getProjection(),
MapTypeEvent.MAPTYPE_NORMAL, _mapTypeOptions);
map.addMapType(_mapNormal);
_mapSatellite = new
MapType([MapType.SATELLITE_MAP_TYPE.getTileLayers()[0], new
SpotDotTile() ], MapType.NORMAL_MAP_TYPE.getProjection(),
MapTypeEvent.MAPTYPE_NORMAL, _mapTypeOptions);
map.addMapType(_mapSatellite);
_mapHybrid = new
MapType([MapType.HYBRID_MAP_TYPE.getTileLayers()
[0], MapType.HYBRID_MAP_TYPE.getTileLayers()[1], new SpotDotTile() ],
MapType.NORMAL_MAP_TYPE.getProjection(), MapTypeEvent.MAPTYPE_NORMAL,
_mapTypeOptions);
map.addMapType(_mapHybrid);
_mapTerrain = new
MapType([MapType.PHYSICAL_MAP_TYPE.getTileLayers()
[0], new SpotDotTile() ], MapType.NORMAL_MAP_TYPE.getProjection(),
MapTypeEvent.MAPTYPE_NORMAL, _mapTypeOptions);
map.addMapType(_mapTerrain);
_mapForecast = getForecastMap();
map.addMapType(_mapForecast);
_mapsSet = true;
}
This takes place before a search is conducted. However, between the
actual result from search and when map types and the lat lon, and zoom
level are set for the map, Google maps loads the WORLD VIEW first
where it fetches a ton of tiles from the google tile servers. Using
firebug you can see this.
Basic event chain should look like:
1. Load flex app
2. Fire a search
3. Set map types
4. Upon a search result, set the google maps lat lon and zoom level
However it appears to do this:
1. Load flex app
2. Fire a search
3. Set map types
4. Google maps loads, and loads unnecessary tiles and map types
5. Upon a search result, set the google maps lat lon and zoom level
We don't want Google maps to do anything until we have a search result
from our server. Is this possible? If so, how can we prevent the 300+
requests that are taking place? Our goal is to drastically improve
performance... HELP!!!!
--
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.