TerryGustafson
Frequent Contributor
since ‎07-16-2015
9 Badges Earned
Responder Responder
View All Badges Earned
‎11-11-2020
256 Posts created
41 Kudos given
3 Solutions
12 Kudos received
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

My Ideas

(0 Idea Submissions)

Latest Contributions by TerryGustafson

POST
1
24
2426
POST
0
1
2426
POST
0
28
2426
POST
0
30
2426
POST
0
2
1062
POST
0
32
8949
POST

Ok , I make some progress but still can’t figure out why this will not go to the define coordinates.. Any ideas?











html, body, #mapDiv

#info

.label





var map;

var APP = {};

require([

"dojo/dom", "dojo/_base/array", "dojo/promise/all", "dojo/json",

"esri/map", "esri/domUtils", "esri/graphic", "esri/graphicsUtils",

"esri/geometry/Point", "esri/SpatialReference", "esri/tasks/GeometryService", "esri/tasks/Geoprocessor",

"esri/tasks/FeatureSet", "esri/tasks/RelationParameters",

"esri/Color", "esri/symbols/SimpleLineSymbol",

"esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleFillSymbol",

"esri/config", "esri/request", "dojo/domReady!"

], function(

dom, array, all, JSON,

Map, domUtils, Graphic, graphicsUtils,

Point, SpatialReference, GeometryService, Geoprocessor,

FeatureSet, RelationParameters,

Color, SimpleLineSymbol,

SimpleMarkerSymbol, SimpleFillSymbol,

esriConfig, esriRequest

) {

var geometryService, geometries, baseGraphics;

map = new esri.Map("mapDiv", {

basemap: "topo",

center: ,

zoom: 15

});

map.on("click", executeGP);

var gpUrl = "http://app.mdt.mt.gov/arcgis/rest/services/LRS/LocateFeaturesOnDCandRM/GPServer/Locate%20features%20along%20DC%20and%20RM";

APP.geoprocessor = new Geoprocessor(gpUrl);

function executeGP(){

var point = new Point(-12180856.426452411, 5952832.259593694, new SpatialReference({ wkid: 102100 }));

//var geometry = new geometry();

var graphic = new Graphic(point);

var features = [];

var featureSet = new FeatureSet();

featureSet.features = features;

var params = {

"f": "json",

"outSR": 102100,

"City_Centers" : featureSet,/**{

"geometryType":"esriGeometryPoint",

"features": [{

"geometry": {

"x": -12180856.426452411,

"y": 5952832.259593694,

"spatialReference":{

"wkid": 102100

}

}

}],

"sr": {

"wkid": 102100

}

},**/

"Search_Radius": {

"distance":50,

"units":"esriFeet"

},

"Keep_only_closest_route_location": false

//'distance_field': true,

//'zero_length_events': true,

//'in_fields': true,

//'m_direction_offsetting': true

};

APP.geoprocessor.submitJob(params, processGP);

};

function processGP(jobInfo){

APP.geoprocessor.getResultData(jobInfo.jobId, "LRM_DC_RM_MI1", renderResult);

};

function renderResult(result, message){

alert(result);

};

});








Enter the lat/long:



-->
0
0
362
DOC
0
0
10434
POST
0
2
1681
POST
0
0
630
POST
0
0
1681
POST
0
4
1681
POST
0
1
3121
POST
0
6
1681
DOC
0
0
10434
Activity Feed
User Groups for TerryGustafson
Contact Me
Online Status
Offline
Date Last Visited
‎11-11-2020 02:25 AM