Hi JB-
You should also import com.google.maps.controls, com.google.maps.overlays,
etc.

- pamela

On Wed, Jul 15, 2009 at 9:28 PM, Joaquim Batatas <[email protected]>wrote:

>
> Greetings and salutations,
>
> i recently used the flash api for the first time, the map itself loads
> without a problem, but when I try add any control or marker it gives
> an error message. can't figure out why. can you help me?
>
> this is the code I'm using:
>
> import com.google.maps.*;
> "
> var map:Map = new Map();
> map.key = "too big";
> map.setSize(new Point(stage.stageWidth, stage.stageHeight));
> map.addEventListener(MapEvent.MAP_READY, onMapReady);
> this.addChild(map);
>
> function onMapReady(event:MapEvent):void {
>        map.setCenter(new LatLng(38.577821,-8.889920), 14,
> MapType.NORMAL_MAP_TYPE);
>        map.addControl(new ZoomControl());
>        map.addControl(new PositionControl());
>        map.addControl(new MapTypeControl());
> }
> "
>
> and these are the error messages i get
>
> 1180: Call to a possibly undefined method ZoomControl.
> 1180: Call to a possibly undefined method PositionControl.
> 1180: Call to a possibly undefined method MapTypeControl.
>
> appreciate any help.
>
> best regards,
> JB
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to