My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" viewSourceURL="srcview/index.html">
<maps:Map3D xmlns:maps="com.google.maps.*"
mapevent_mappreinitialize="onMapPreinitialize(event)"
mapevent_mapready="onMapReady(event)"
id="map"
sensor="false" key="your_api_key"
width="100%" height="100%"/>
<mx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map3D;
import com.google.maps.MapEvent;
import com.google.maps.MapMouseEvent;
import com.google.maps.MapOptions;
import com.google.maps.MapType;
import com.google.maps.View;
import com.google.maps.controls.MapTypeControl;
import com.google.maps.controls.NavigationControl;
import com.google.maps.geom.Attitude;

private function onMapPreinitialize(event:MapEvent):void {
var myMapOptions:MapOptions = new MapOptions;
myMapOptions.zoom = 12;
myMapOptions.center = new LatLng(40.756054, -73.986951);
myMapOptions.mapType = MapType.NORMAL_MAP_TYPE;
myMapOptions.viewMode = View.VIEWMODE_PERSPECTIVE;
myMapOptions.attitude = new Attitude(20,30,0);
this.map.setInitOptions(myMapOptions);
}

private function onMapReady(event:MapEvent):void {
this.map.addControl(new NavigationControl());
}
]]>
</mx:Script>
</mx:Application>

Change log

r341 by t...@google.com on Sep 21, 2010   Diff
Update the code samples to not include a
valid API key
Go to: 
Project members, sign in to write a code review

Older revisions

r340 by t...@google.com on Sep 21, 2010   Diff
Add sensor parameter to code samples
r316 by manshreck on Jul 27, 2009   Diff
Added 3D Sample MXML

All revisions of this file

File info

Size: 1285 bytes, 37 lines

File properties

svn:executable
*
Powered by Google Project Hosting