Flashでグーグルマップを使いたいと思っていたが

基本的ことから知りたいと思っていてよいものが

なかったが参考になる記事があったのでメモひらめき電球


分かりやすく説明されているのでありがたいです。

感謝ですニコニコ


Google Maps API for Flash - Flash CS3 Tutorial


Google Map を使ってみる。

以下引用です。


import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
import com.google.maps.Color;
import com.google.maps.MapMouseEvent;
import com.google.maps.controls.*;
import com.google.maps.styles.*;
import com.google.maps.overlays.*;

var map:Map = new Map();
map.key = "your API key";
map.setSize(new Point(stage.stageWidth, stage.stageHeight));
map.addEventListener(MapEvent.MAP_READY, onMapReady);
map.language = "ja";
map.addControl(new MapTypeControl());
map.addControl(new PositionControl());
map.addControl(new ZoomControl());
map.addControl(new ScaleControl());
//------Overview Control
var cpOption:Object = {
controlStyle:{
bevelStyle: BevelStyle.BEVEL_NONE
,strokeStyle: {color: Color.GRAY10,alpha: 1.0,thickness: 1.0}
}
,padding:{x:0,y:0}
,position: new ControlPosition(ControlPosition.ANCHOR_BOTTOM_RIGHT)
,size: {x: 100*stage.stageWidth/stage.stageHeight,y: 100}
};
map.addControl(new OverviewMapControl(new OverviewMapControlOptions(cpOption)));
this.addChild(map);
function onMapReady(event:Event):void {
map.setCenter(new LatLng(35.319677,139.552953), 10, MapType.NORMAL_MAP_TYPE);
}