Hi Bhupender- Please post a new topic; this post is unrelated to this thread. Also, please only post questions about the Maps API for Flash. There are general forums for Flash/Flex issues out there.
- pamela On Tue, Nov 25, 2008 at 10:32 PM, Bhupender Giri <[EMAIL PROTECTED]>wrote: > Hi, > > I m unable to run video. I ma using following code in my .mxml > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > creationComplete="srv.send()" backgroundColor="white" > > > <mx:HTTPService id="srv" url="http://ws.jamesward.org/youtube.xml"/> > > > <mx:DataGrid id="dg" dataProvider="{srv.lastResult.videos.video}"/> > > <mx:VideoDisplay source="{dg.selectedItem.url}" width="400" > height="300"/> > > </mx:Application> > > > On Tue, Nov 25, 2008 at 5:00 PM, pamela (Google Employee) < > [EMAIL PROTECTED]> wrote: > >> Hi Freed- >> You should be calling getLatLngBounds function on the map object. >> >> - pamela >> >> >> On Tue, Nov 25, 2008 at 9:54 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: >> >>> >>> Hi, >>> >>> I'm a newbie on Google Maps Flash API, and when I try to use >>> getLatLngBounds() the compiler returns me an error "1180: Call to a >>> possibly undefined method getLatLngBounds" >>> >>> This is my piece of code : >>> >>> import flash.events.Event; >>> >>> import com.google.maps.controls.MapTypeControl; >>> import com.google.maps.controls.ZoomControl; >>> import com.google.maps.controls.PositionControl; >>> import com.google.maps.overlays.Polyline; >>> import com.google.maps.overlays.Marker; >>> import com.google.maps.MapEvent; >>> import com.google.maps.Map; >>> import com.google.maps.MapType; >>> import com.google.maps.MapMouseEvent; >>> import com.google.maps.LatLng; >>> import com.google.maps.LatLngBounds; >>> import com.google.maps.overlays.GroundOverlay; >>> import com.google.maps.overlays.GroundOverlayOptions; >>> >>> >>> >>> var map:Map = new Map(); >>> map.key = "my_key"; >>> map.setSize(new Point(stage.stageWidth, stage.stageHeight)); >>> map.addEventListener(MapEvent.MAP_READY, onMapReady); >>> >>> >>> map.addControl(new PositionControl()); >>> >>> >>> var message:Array = ["This","is","the","secret","message"]; >>> function onMapReady(event:MapEvent):void { >>> >>> map.addControl(new ZoomControl()); >>> map.addControl(new PositionControl()); >>> map.addControl(new MapTypeControl()); >>> map.setCenter(new LatLng(37.4419, -122.1419), 13, >>> MapType.NORMAL_MAP_TYPE); >>> >>> // Add 10 markers to the map at random locations >>> var bounds:LatLngBounds = 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 < 10; 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)); >>> } >>> >>> >>> } >>> >>> >>> this.addChild(map); >>> >>> >>> However... Is it possible to center the map with a simple place ou >>> address instead of the lat ant lng datas ? >>> And what about the same thing for placing markers on the map ? >>> >>> Thanks a lot >>> >>> Freed >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
