<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2008 Google Inc.
Licensed under the Apache License, Version 2.0:
http://www.apache.org/licenses/LICENSE-2.0
-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:maps="com.google.maps.*"
layout="absolute"
width="100%"
height="100%"
viewSourceURL="srcview/index.html">
<mx:Panel title="Google Maps API for Flash Demo"
width="100%"
height="100%">
<maps:Map id="map"
key="ABQIAAAAtDJGVn6RztUmxjnX5hMzjRRe6jqCYhmMejXENq58KWrRXS3VMxT-muN3IObdGe-IHNb4lrnKS4HVYQ"
mapevent_mapready="onMapReady(event)"
width="100%"
height="100%"/>
</mx:Panel>
<mx:Script>
<![CDATA[
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.LatLng;
import com.google.maps.overlays.MarkerOptions;
import com.google.maps.interfaces.IProjection;
import com.google.maps.styles.FillStyle;
import com.google.maps.styles.StrokeStyle;
import com.google.maps.overlays.PolygonOptions;
import com.google.maps.overlays.Polygon;
import com.google.maps.InfoWindowOptions;
import flash.events.Event;
import com.google.maps.MapEvent;
import com.google.maps.Map;
import com.google.maps.MapType;
import com.google.maps.LatLng;
import LineOverlayDemo.Constant;
private var locations:Array=Constant.locations;
private var currentLocation:int=0;
private var cloudOverlay:LineOverlay;
private var markers:Array=[];
private function onMapReady(event:Event):void
{
map.setCenter(new LatLng(31.17709,111.09375), 5, MapType.NORMAL_MAP_TYPE);
var latlngs:Array = new Array();
for(var i:uint=0; i < locations.length; i++)
{
var latlng:LatLng=new LatLng(Number(locations[i].lat), Number(locations[i].lng));
latlngs.push(latlng);
}
var polygonOptions:PolygonOptions = new PolygonOptions();
var fillStyle:FillStyle = new FillStyle();
fillStyle.alpha = 0.5;
fillStyle.color = "0xff0040";
polygonOptions.fillStyle = fillStyle;
//StrokeStyle 类用于为绘制图形对象的轮廓指定一组参数。
var strokeStyle:StrokeStyle = new StrokeStyle();
strokeStyle.alpha = 0.2; //透明度
strokeStyle.color = "0xffffff";
strokeStyle.thickness = 10; //用于指定笔触粗细
polygonOptions.strokeStyle = strokeStyle
var polygon:Polygon = new Polygon(latlngs, polygonOptions);
map.addOverlay(polygon);
}
]]>
</mx:Script>
</mx:Application>
//StrokeStyle 类用于为绘制图形对象的轮廓指定一组参数。
var strokeStyle:StrokeStyle = new StrokeStyle();
strokeStyle.alpha = 0.2; //透明度
strokeStyle.color = "0xffffff";
strokeStyle.thickness = 10; //用于指定笔触粗细
polygonOptions.strokeStyle = strokeStyle
分享到:
相关推荐
Exploiting Sparse Semantic HD Maps for Self-Driving Vehicle Localization
iBATIS-SqlMaps-2-Tutorial_cniBATIS-SqlMaps-2-Tutorial_cn.pdf.pdfiBATIS-SqlMaps-2-Tutorial_cn.pdfiBATIS-SqlMaps-2-Tutorial_cn.pdf
$ npm install --save google-maps-api-loader 用法 var GoogleMapsApiLoader = require ( 'google-maps-api-loader' ) ; GoogleMapsApiLoader ( { libraries : [ 'places' ] , apiKey : 'your-api-key' // ...
GoogleMaps-iOS-1.1.0 SDK
Google-Maps-API-China
Exploiting Sparse Semantic HD Maps for Self-Driving Vehicle Localization.zip
ArcGIS SDK for GameEngine Unreal Engine arcgis的虚幻引擎开发包 在arcgis开发者官网下载的,由于官网抽风经常上不去,我下载了上传造福大家
google-maps-services-go, 谷歌地图 API Web服务的客户端库 访问 谷歌地图 服务 描述使用要对进行地理编码? 查找方向。? 也许是矩阵的方向。? 这个库将 谷歌地图 API Web服务 插件引入到你的go应用程序中。 谷歌...
Beginning-Google-Maps-Applications-with-PHP-and-Ajax-From-Novice-to-Professional.pdf
资源来自pypi官网。 资源全名:googlemaps-3.1.0-py3-none-any.whl
python库,解压后可用。 资源全名:googlemaps-3.1.0-py3-none-any.whl
google maps中文版原版,可以运行于os4.3
google-maps-api-threejs-layer, 谷歌地图 API层,使用 Three.js 实现超快速动画 用于 谷歌地图 API的 Three.js-层谷歌地图 API层,使用 Three.js 实现超快速动画。用法new ThreejsLayer(options, completeCallback)...
The most recent Google Maps API for Adobe Flash is the map_1_9a.swc and for Adobe Flex or Adobe Air it is the map_flex_1_9a.swc one. It fixes two bugs: Geocoding and Directions fail if swf is hosted ...
Google Maps Services的Node.js客户端 该库是发布到的先前版本的重构。...$ npm install @googlemaps/google-maps-services-js 下面是一个在客户端类上调用height方法的简单示例。 使用Typescript和ES6模块导入Googl
将官方提供的arcgis-maps-sdk-unreal-engine-samples通过UE5.1和vs2022重新编译,可直接双击运行。 注意:由于文件过大,分压缩包打包上传,关联压缩包...arcgis-maps-sdk-unreal-engine-samples for UE5.1.part02.rar
将官方提供的arcgis-maps-sdk-unreal-engine-samples通过UE5.1和vs2022重新编译,可直接双击运行。 注意:由于文件过大,分压缩包打包上传,关联压缩包...arcgis-maps-sdk-unreal-engine-samples for UE5.1.part02.rar
google-maps-marker-clusterer-v3 Google Maps v3的标记群集器
Google Maps JavaScript API加载程序 描述 动态加载Google Maps JavaScript API脚本。 这从 npm包中获得灵感,但使用ES6,Promises和TypeScript对其进行了更新。 该软件包的早期版本可在但在此处已重命名为软件包 ...
Google-Maps-TSP-Solver, 谷歌地图 类解算器位于位于位置的Engdahl规划求解的Geir篓的fork Google-Maps-TSP-Solver计算访问给定位置的最快路径的谷歌地图 TSP解算器。 它是engdahl解规划项目的fork的Geir,但是它是/...