Hello Code Gurus....
>
>
>Below im mxml code for gecoding Addresses, now embedding google streetview in
>my
>html. What I want to archieve is as the marker locates the postcode search or
>address search in my map, it then parse the latlon of the position maker to
>the
>streetview panorama and displays the streetview image of that search. but
>obviously, I' M NOT ARCHIEVING THIS. HELP PLEASE.
>HERE IS THE CODE.... it displays the marker for the search but not the
>streetview
><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
>xmlns:maps="com.google.maps.*"
>
>width="100%" height="100%" layout="absolute"
>viewSourceURL="srcview/index.html">
>
><mx:Panel title="Google Maps Demo" width="100%" height="100%">
><mx:VBox width="100%" height="55%">
><mx:HBox width="100%" height="25">
><mx:Label
>text="Enter address: "/>
><mx:TextInput x="76" y="10"
>id="address"
>text="london"
>enter="doGeocode(event);" />
><mx:Button
>id="submitButton" label="Search"
>click="doGeocode(event);"
>/>
></mx:HBox>
><maps:Map
>id="map"
>key="ABQIAAAA6-wf-nBKy-SMBfMdxRjYqxRjBgYrW1knLEOdndkig2gkeE6wEhT7MqUe29V1
>DYC-8Dw_CYwZPhdzzw"
>
>mapevent_mapready="onMapReady(event)"
>width="100%" height="100%"/>
></mx:VBox>
></mx:Panel>
><mx:Script>
><![CDATA[
>import com.google.maps.services.ClientGeocoderOptions;
>import com.google.maps.LatLng;
>import com.google.maps.Map;
>import com.google.maps.MapEvent;
>import com.google.maps.MapMouseEvent;
>import com.google.maps.MapType;
>import com.google.maps.services.ClientGeocoder;
>import com.google.maps.services.GeocodingEvent;
>import com.google.maps.overlays.Marker;
>import com.google.maps.overlays.MarkerOptions;
>import com.google.maps.InfoWindowOptions;
>import mx.controls.Alert;
>import com.google.maps.controls.ZoomControl;
>
>
>import com.google.maps.controls.MapTypeControl;
>import com.google.maps.controls.PositionControl;
>
>private function onMapReady(event:Event):void {
>//this.map.setCenter(new LatLng(37.4419, -122.1419), 13,
>MapType.NORMAL_MAP_TYPE);
>
>this.map.setCenter(new LatLng(51.522524, -0.110933), 13,
>MapType.NORMAL_MAP_TYPE);
>
>
>map.enableScrollWheelZoom();
>map.enableContinuousZoom();
>map.addControl(new ZoomControl());
>}
>
>private function doGeocode(event:Event):void {
>// Geocoding example
>var geocoder:ClientGeocoder = new ClientGeocoder();
>geocoder.addEventListener(
>GeocodingEvent.GEOCODING_SUCCESS,
>function(event:GeocodingEvent):void {
>var placemarks:Array = event.response.placemarks;
>if (placemarks.length > 0) {
>map.setCenter(placemarks[0].point);
>var marker:Marker = new Marker(placemarks[0].point);
>marker.addEventListener(MapMouseEvent.CLICK, function
>(event:MapMouseEvent):void
>{
>
>marker.openInfoWindow(new InfoWindowOptions({content:
>placemarks[0].address}));
>
>This is the error....
>marker.setLatLng(event.latLng);
>ExternalInterface.call( "setPanorama", event.latLng.lat(), event.latLng.lng()
);
>});
>
>map.addOverlay(marker);
>}
>});
>geocoder.addEventListener(
>GeocodingEvent.GEOCODING_FAILURE,
>function(event:GeocodingEvent):void {
>Alert.show("Geocoding failed");
>trace(event);
>trace(event.status);
>});
>geocoder.geocode(address.text);
>}
>]]>
></mx:Script>
></mx:Application>
>
>
>Thanks
>
>Matilda
--
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.