<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:ic="http://www.supermap.com/iclient/2010"
xmlns:is="http://www.supermap.com/iserverjava/2010"
width="100%" height="100%">
<fx:Script>
<![CDATA[
import com.supermap.web.core.styles.PictureMarkerStyle;
private var picStyle:PictureMarkerStyle;
private function init():void
{
//图片样式,其中图片存储路径仅作参考
picStyle = new PictureMarkerStyle("assets/flex-iframe-logo-128.png");
//定义地图操作为 AddPicture
this.map.action = new AddPicture(this.map, picStyle);
}
]]>
</fx:Script>
<!--添加地图-->
<!--scales:您的地图比例尺;url:您的 Web 服务地址;url:您的地图服务地址;-->
<ic:Map id="map" x="0" y="0" height="100%" width="100%"
scales="{[1.25e-9, 2.5e-9, 5e-9, 1e-8, 2e-8, 4e-8, 8e-8, 1.6e-7, 3.205e-7, 6.4e-7]}">
<is:TiledDynamicRESTLayer url="http://192.168.11.11:8090/iserver/services//maps/rest/maps/World Map"/>
</ic:Map>
</s:Application>
|