Some futher information.
If I use the "HelloWorld" example embedded in one of my source files
(relevant sections shown below):
<mx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
private function onMapPreinitialize(event:Event):void {
this.aMap.setCenter(new LatLng(40.736072,-73.992062), 14,
MapType.NORMAL_MAP_TYPE);
}
// other code...
]]>
</mx:Script>
<maps:Map xmlns:maps="com.google.maps.*"
id="aMap"
width="900" height="800"
key="ABQIAAAAuAZy45jesgInRsqXVWOWMRQ6NtYFKz8kcipay_9yGtFnqZ2WIxRoOwKZqHpS5gV8Wbrudz2JwPzBHA"
sensor="false"/>
I can compile it (not surprising) but when I execute the onMapPreinitialize
method (from a button click), Flash fails with:
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at com.google.maps::MapType$/getDefaultMapType()
at com.google.maps::MapType$/get NORMAL_MAP_TYPE()
at
com.tsr.flex.controls::CampsiteGraphicalCalendar/onMapPreinitialize()[C:\projects\FlexProjects\EventPlannerCommon\com\tsr\flex\controls\CampsiteGraphicalCalendar.mxml:94]
at
com.tsr.flex.controls::CampsiteGraphicalCalendar/___CampsiteGraphicalCalendar_Button3_click()[C:\projects\FlexProjects\EventPlannerCommon\com\tsr\flex\controls\CampsiteGraphicalCalendar.mxml:267]
(the last two lines are obviously my code.)
Anybody have any idea what I am missing?
TIA,
Carl
--
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.