Currently, we use the initialization of the Map class as a signal that we need to load in the full implementation library, so none of the other classes are actually available until after that has loaded in. In the future, we may be able to change this situation.
2009/5/7 [CPR]-AL.exe <[email protected]>: > > Yes, thanks - I already figured that out. But why is that made > necessary? Why couldn't I create markers without a map? For example, I > parse them from some XML to store in memory and to use them sometime > later. > > On 7 май, 03:39, pamela fox <[email protected]> wrote: >> Is it possible that you're using Marker before onMapReady event? >> >> - pamela >> >> On Thu, May 7, 2009 at 4:34 AM, [CPR]-AL.exe <[email protected]> wrote: >> >> > I'm completely tired and cannot understand what is going on >.< >> >> > package >> > { >> > import com.google.maps.LatLng; >> > import com.google.maps.overlays.Marker >> >> > /* .... */ >> > public class CardLocationXMLParser >> > { >> > public static function getMarkerFromXML(dataNode:XMLList, >> > categories:Array):Marker >> > { >> >> > var markerLocation:LatLng = new >> > LatLng(Number(dataNode.lat), >> > Number(dataNode.lng)) >> >> > var resultingMarker:Marker = new >> > Marker(markerLocation) / >> > *error line*/ >> >> > return resultingMarker >> > } >> > } >> >> > I get this: >> >> > "TypeError: Error #1009: Cfn't get a property or method through a >> > reference a static type"null". >> > at com.google.maps.overlays::Marker() >> > at ru.datagreed.maps.parsers::CardLocationXMLParser/getMarkerFromXML >> > () >> > at ru.datagreed.maps.parsers::CardLocationXMLParser$/ >> > getCurrentMarkerFromXML() >> > at ru.datagreed.maps::CardLocationMap/parseXML() >> > at ru.datagreed.maps::CardLocationMap() >> > at card_location_fla::MainTimeline/frame8()" >> >> > It's tracing back to the marker constructor. >> >> > new LatLng(Number(dataNode.lat), Number(dataNode.lng) - all parameters >> > are ok. Even if i set any parameters by hand (like new LatLng(1,1) - >> > the error is here. >> >> > What should i do? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
