There are several geocoding examples here:
http://code.google.com/apis/maps/documentation/flash/demogallery.html?searchquery=geocoding&classname=
On Tue, Nov 25, 2008 at 11:13 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi Pamela,
>
> Thank you for your answer ! it works... Now I want to know how I can
> find lat and lng just by typing an address... is it possible ?
>
>
>
> On 25 nov, 12:30, "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- Masquer le texte des messages précédents -
>>
>> - Afficher le texte des messages précédents -
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---