Google Maps API ouyangcsisu edu tw Google Maps

  • Slides: 16
Download presentation
Google Maps API 義守大學資訊 程學系 歐陽振森 ouyangcs@isu. edu. tw

Google Maps API 義守大學資訊 程學系 歐陽振森 ouyangcs@isu. edu. tw

Google Maps API Key l l 須先申請Google Maps API key 申請網址:http: //code. google. com/apis/maps/signup.

Google Maps API Key l l 須先申請Google Maps API key 申請網址:http: //code. google. com/apis/maps/signup. html

基礎物件-GMap 2 l 建立物件 l l 開啟地圖拖曳功能 l l disable. Dragging() 取得地圖拖曳功能狀態 l l

基礎物件-GMap 2 l 建立物件 l l 開啟地圖拖曳功能 l l disable. Dragging() 取得地圖拖曳功能狀態 l l enable. Dragging() 關閉地圖拖曳功能 l l var map=new GMap 2(element, GMap. Options); dragging. Enabled() 範例二: 3 -1. html

l 加入地圖控制項物件 l l 移除地圖控制像物件 l l add. Control(control, position) remove. Control(control) 範例六: 3

l 加入地圖控制項物件 l l 移除地圖控制像物件 l l add. Control(control, position) remove. Control(control) 範例六: 3 -6. html

基礎物件-GMap. Options l 範例八: 3 -14. html

基礎物件-GMap. Options l 範例八: 3 -14. html

事件物件-GEvent l 監聽指定地圖物件之事件 l l add. Listener(source, event, handler) 範例九: 3 -19. html

事件物件-GEvent l 監聽指定地圖物件之事件 l l add. Listener(source, event, handler) 範例九: 3 -19. html

控制項物件-GControl. Position l 建立物件 l l l Var g. Control. Position=new GControl. Position(anchor, offset)

控制項物件-GControl. Position l 建立物件 l l l Var g. Control. Position=new GControl. Position(anchor, offset) anchor: G_ANCHOR_TOP_RIGHT、 G_ANCHOR_TOP_LEFT、 G_ANCHOR_BOTTOM_RIGHT、 G_ANCHOR_BOTTOM_LEFT 範例十一: 3 -26. html