var myMap,geometryService,businessGraphicsLayer,queryTask,query;
//初始化加载地图的方法
function init() {
var startExtent = new esri.geometry.Extent(120.1044117860087,30.24444042330439, 120.25890702814839,30.347437251397523,esri.SpatialReference({wkid:32662}));
//构造函数esriMap(divId,options?),options?参数总结如下: nav:true/false 是否在地图边上显示 8 个方向移动的功能按钮。 slider:true/false 是否显示比例滚动条。 extent:Extent 设置地图控件的初始地图范围 var map = new esri.Map("map",{ nav:true,slider:true,extent:startExtent});
//var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE,10,new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255,0,0]),1),new dojo.Color([0,255,0,0.25]));
var symbol = new esri.symbol.PictureMarkerSymbol(‘E:/地图/部署/images/crossing-alarm.png‘, 25, 40);//esri.symbol.PictureMarkerSymbol(url, width, height)
break;
case "line":
var symbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH,new new dojo.Color([255,0,0]),1);
break;
case "polygon":
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([0,0,0]),1), new dojo.Color([255,0,0,0.25]));