function init() { var startExtent = new esri.geometry.Extent(-102.5,36.8,-99.8,38.4, new esri.SpatialReference({wkid:4326}) ); var map = new esri.Map("map", {extent:startExtent}); var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"); map.addLayer(tiledMapServiceLayer); dojo.connect(map, 'onLoad', function(map) { //Create graphics layer for counties var countyLayer = new esri.layers.GraphicsLayer(); var lat=null var lon=null; var markerSymbol = new esri.symbol.SimpleMarkerSymbol(); var atts = {}; atts["ID"] = 1; lat=37.514; lon=-101.1719; var location = new esri.geometry.Point(lon, lat, new esri.SpatialReference({wkid:4326})); var graphic = new esri.Graphic(location, markerSymbol, atts); graphic.titleField = "ID"; countyLayer.add(graphic); map.addLayer(countyLayer); }); }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.