http://www.w3.org/TR/html4/strict.dtd">
varpointSymbol = new esri.symbol.SimpleMarkerSymbol(); pointSymbol.setOutline = newesri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, newdojo.Color([255, 0, 0]), 1); pointSymbol.setSize(5); pointSymbol.setColor(new dojo.Color([0, 255, 0, 0.25])); var geometry= new esri.geometry.Point(13740395.6058, 5130594.7971); var graphic= new esri.Graphic(geometry, pointSymbol);
myMap.graphics.add(graphic);
// var point = new esri.geometry.Point({ "x": 13740395.6058,"y": 5130594.7971, " spatialReference": { "wkid": 102100} }); myMap.centerAndZoom(geometry, 20);
} function go() {
varpointSymbol = new esri.symbol.SimpleMarkerSymbol(); pointSymbol.setOutline= new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([255, 0, 0]), 1); pointSymbol.setSize(5); pointSymbol.setColor(new dojo.Color([0, 255, 0, 0.25])); //alert(list[i]); var geometry= new esri.geometry.Point(list[i].substring(0, list[i].indexOf(',')),list[i].substring(list[i].indexOf(',') + 1, list[i].length));
var graphic = new esri.Graphic(geometry, pointSymbol);
myMap.graphics.add(graphic); var extent =myMap.extent; if(!extent.contains(graphic.geometry)) { myMap.centerAt(geometry); }
i++; }
function gogps() { go(); if (i
} function init() { //var myMap = newesri.Map("mapDiv"); var customExtentAndSR =new esri.geometry.Extent(13676444.4499247, 5092822.83792968, 13781163.1786753,5160163.85984883, new esri.SpatialReference({ "wkid": 102100}));
myMap = new esri.Map("mapDiv", {extent:customExtentAndSR});
//note that if you do not havepublic Internet access then you will need to point this url to your own locallyaccessible cached service. var myTiledMapServiceLayer = newesri.layers.ArcGISTiledMapServiceLayer("http://www.arcgisonline.cn/ArcGIS/rest/services/ChinaCities_Community_BaseMap_CHN/ShenYang_Community_BaseMap_CHN/MapServer"); myMap.addLayer(myTiledMapServiceLayer);
回放"nclick=' ptcounntSplit();gogps()'/>
} dojo.addOnLoad(init); 定位"nclick='ptPosition()' />