"<input type='button' value='CONFIRM' onClick='executeIdentifyTask(evt);' />"
dojo.connect('button', 'onClick', executeIdentifyTask)
var evtCopy = evt;
function markpoint(evt) { map.graphics.clear(); var evtCopy = evt; var point = evt.mapPoint; var symbol = new esri.symbol.SimpleMarkerSymbol().setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND); var graphic = new esri.Graphic(point, symbol); var outSR = new esri.SpatialReference({ wkid: 27700}); map.graphics.add(graphic); gsvc.project([ point ], outSR, function(projectedPoints) { pt = projectedPoints[0]; graphic.setInfoTemplate(new esri.InfoTemplate("HERE?", "<p> X: " + pt.x + "<br /> Y: " + pt.y + "</p>" + "<input type='button' value='CONFIRM' onclick='executeIdentifyTask(evtCopy);' />" + "<div id='latlong'></div>")); map.infoWindow .setFeatures([graphic]) .show(evtCopy.screenPoint, map.getInfoWindowAnchor(evtCopy.screenPoint)); }); }
gsvc = new esri.tasks.GeometryService("http://bl-arcgis-1/ArcGIS/rest/services/Geometry/GeometryServer"); dojo.connect(map, "onClick", markpoint); dojo.connect(map, "onLoad", mapReady); }; function markpoint(evt) { map.graphics.clear(); var point = evt.mapPoint; var symbol = new esri.symbol.SimpleMarkerSymbol().setStyle(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND); var graphic = new esri.Graphic(point, symbol); var outSR = new esri.SpatialReference({ wkid: 27700}); map.graphics.add(graphic); gsvc.project([ point ], outSR, function(projectedPoints) { pt = projectedPoints[0]; graphic.setInfoTemplate(new esri.InfoTemplate("HERE?", "<p> X: " + pt.x + "<br/> Y: " + pt.y + "</p>" + "<input type='button' value='CONFIRM' onClick='executeIdentifyTask(evt);' />" + "<div id='latlong'></div>")); map.infoWindow .setTitle(graphic.getTitle()) .setContent(graphic.getContent()) .show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint)); }); } function mapReady(map){ //create identify tasks and setup parameters //dojo.connect(map,"onClick",executeIdentifyTask); identifyTask = new esri.tasks.IdentifyTask("http://bl-arcgis-1/ArcGIS/rest/services/CRM/MapServer"); identifyParams = new esri.tasks.IdentifyParameters(); identifyParams.tolerance = 3; identifyParams.returnGeometry = false; identifyParams.layerIds = [1,2,3,4]; identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL; identifyParams.width = map.width; identifyParams.height = map.height; } function executeIdentifyTask(evt) { identifyParams.geometry = evt.mapPoint; identifyParams.mapExtent = map.extent;
gsvc = new esri.tasks.GeometryService("http://bl-arcgis-1/ArcGIS/rest/services/Geometry/GeometryServer"); dojo.connect(map, "onClick", markpoint); dojo.connect(map, "onLoad", mapReady); function markpoint(evt) { //rest of function graphic.setInfoTemplate(new esri.InfoTemplate("HERE?", "<p> X: " + pt.x + "<br/> Y: " + pt.y + "</p>" + "<input type='button' value='CONFIRM' onclick='executeIdentifyTask(evt);' />" + "<div id='latlong'></div>")); //rest of function } function mapReady(map){ //function executeIdentifyTask(){ alert("line 87"); //dojo.connect(map,"onLoad",executeIdentifyTask); //create identify tasks and setup parameters identifyTask = new esri.tasks.IdentifyTask("http://bl-arcgis-1/ArcGIS/rest/services/CRM/MapServer"); // rest of function }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.