现在的位置: 首页 > 综合 > 正文

Add an overlay tile layer sample code

2013年08月08日 ⁄ 综合 ⁄ 共 1109字 ⁄ 字号 评论关闭

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Virtual Earth v5 API Sample - Tile Layer Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6"></script>
<script type="text/javascript">
var map = null;

function EventMapLoad()
{
    var tileSource = new VETileSourceSpecification("SeattleTransit", "http://arcgis-server/arcgiscache/britain/layer_newLayer/%4.png");
    tileSource.NumServers = 1;
    tileSource.Bounds = [new VELatLongRectangle(new VELatLong(60.466698,-19.172006),new VELatLong(49.774985,3.746804))];
    tileSource.MinZoomLevel = 1;
    tileSource.MaxZoomLevel = 7;
    tileSource.Opacity = 0.6;
    tileSource.ZIndex = 100;
    map.AddTileLayer(tileSource, true);
}

function CreateMap()
{
    map = new VEMap('myMap');
    //map.onLoadMap = EventMapLoad;
    map.LoadMap(new VELatLong(40.0861146567883, -113.396919381614), 4, 'r', false);
    EventMapLoad();
}
</script>
</head>
<body onload="CreateMap();">
<div id='myMap' style="position:relative; width:800px; height:600px;"></div>
</body>
</html>

抱歉!评论已关闭.