|
POST
|
That is my issue! I am not able to display the graphics on the map!
... View more
11-30-2017
10:40 AM
|
0
|
0
|
1557
|
|
POST
|
Yes I am getting result like [
{
"displayFieldName":"",
"fieldAliases":{
"OBJECTID":"OBJECTID"
},
"geometryType":"esriGeometryPoint",
"spatialReference":{
"wkid":102100,
"latestWkid":3857
},
"fields":[
{
"name":"OBJECTID",
"type":"esriFieldTypeOID",
"alias":"OBJECTID"
}
],
"features":[
{
"attributes":{
"OBJECTID":5270
},
"geometry":{
"x":-9814184.757,
"y":5130582.574600004
}
},
{
"attributes":{
"OBJECTID":5271
},
"geometry":{
"x":-9814152.5879,
"y":5130624.636799999
}
},
{
"attributes":{
"OBJECTID":5272
},
"geometry":{
"x":-9814147.7353,
"y":5130632.882600002
}
},
{
"attributes":{
"OBJECTID":5273
},
"geometry":{
"x":-9814131.0948,
"y":5130659.340300001
}
},
{
"attributes":{
"OBJECTID":5279
},
"geometry":{
"x":-9814141.8218,
"y":5130548.319399998
}
},
{
"attributes":{
"OBJECTID":5280
},
"geometry":{
"x":-9814144.0262,
"y":5130563.046300001
}
},
{
"attributes":{
"OBJECTID":5281
},
"geometry":{
"x":-9814082.9311,
"y":5130580.8967999965
}
},
{
"attributes":{
"OBJECTID":5282
},
"geometry":{
"x":-9814061.6542,
"y":5130572.5336000025
}
},
{
"attributes":{
"OBJECTID":5283
},
"geometry":{
"x":-9814050.6173,
"y":5130533.271700002
}
},
{
"attributes":{
"OBJECTID":5284
},
"geometry":{
"x":-9814007.1346,
"y":5130542.435500003
}
},
{
"attributes":{
"OBJECTID":5285
},
"geometry":{
"x":-9813994.5063,
"y":5130541.110299997
}
},
{
"attributes":{
"OBJECTID":5286
},
"geometry":{
"x":-9813938.9024,
"y":5130552.8156
}
},
{
"attributes":{
"OBJECTID":5287
},
"geometry":{
"x":-9813909.17,
"y":5130560.038199998
}
},
{
"attributes":{
"OBJECTID":5288
},
"geometry":{
"x":-9813904.3966,
"y":5130569.3544000015
}
},
{
"attributes":{
"OBJECTID":5289
},
"geometry":{
"x":-9813931.5632,
"y":5130578.931599997
}
},
{
"attributes":{
"OBJECTID":5290
},
"geometry":{
"x":-9813967.3654,
"y":5130581.6382
}
},
{
"attributes":{
"OBJECTID":5291
},
"geometry":{
"x":-9813997.9644,
"y":5130589.073399998
}
},
{
"attributes":{
"OBJECTID":5292
},
"geometry":{
"x":-9814047.1961,
"y":5130610.299099997
}
},
{
"attributes":{
"OBJECTID":5293
},
"geometry":{
"x":-9814057.6105,
"y":5130616.874200001
}
},
{
"attributes":{
"OBJECTID":5294
},
"geometry":{
"x":-9814086.3569,
"y":5130632.1565999985
}
}
]
},
{
"displayFieldName":"",
"fieldAliases":{
"OBJECTID":"OBJECTID"
},
"geometryType":"esriGeometryPoint",
"spatialReference":{
"wkid":102100,
"latestWkid":3857
},
"fields":[
{
"name":"OBJECTID",
"type":"esriFieldTypeOID",
"alias":"OBJECTID"
}
],
"features":[
{
"attributes":{
"OBJECTID":2385
},
"geometry":{
"x":-9814111.7328,
"y":5130548.937399998
}
}
]
},
{
"displayFieldName":"",
"fieldAliases":{
"OBJECTID":"OBJECTID"
},
"geometryType":"esriGeometryPoint",
"spatialReference":{
"wkid":102100,
"latestWkid":3857
},
"fields":[
{
"name":"OBJECTID",
"type":"esriFieldTypeOID",
"alias":"OBJECTID"
}
],
"features":[
{
"attributes":{
"OBJECTID":1392
},
"geometry":{
"x":-9814163.4375,
"y":5130568.742899999
}
},
{
"attributes":{
"OBJECTID":1413
},
"geometry":{
"x":-9814112.7478,
"y":5130638.770000003
}
},
{
"attributes":{
"OBJECTID":1446
},
"geometry":{
"x":-9814059.8415,
"y":5130593.071400002
}
},
{
"attributes":{
"OBJECTID":1459
},
"geometry":{
"x":-9814034.5062,
"y":5130563.520999998
}
},
{
"attributes":{
"OBJECTID":1487
},
"geometry":{
"x":-9814002.767,
"y":5130565.1712
}
},
{
"attributes":{
"OBJECTID":1497
},
"geometry":{
"x":-9813963.8602,
"y":5130567.183799997
}
}
]
},
{
"displayFieldName":"",
"fieldAliases":{
"OBJECTID":"OBJECTID"
},
"geometryType":"esriGeometryPoint",
"spatialReference":{
"wkid":102100,
"latestWkid":3857
},
"fields":[
{
"name":"OBJECTID",
"type":"esriFieldTypeOID",
"alias":"OBJECTID"
}
],
"features":[
{
"attributes":{
"OBJECTID":1047
},
"geometry":{
"x":-9813921.4125,
"y":5130565.028099999
}
},
{
"attributes":{
"OBJECTID":1050
},
"geometry":{
"x":-9814129.4325,
"y":5130614.3423999995
}
}
]
}
] without using the junctionsGraphics = new esri.Graphic(esri.geometry.webMercatorUtils.webMercatorToGeographic(featureSet[i].geometry));
... View more
11-30-2017
10:28 AM
|
0
|
21
|
1557
|
|
POST
|
Thanks for this Ribert but same thing! I am not even getting the result back oon console log
... View more
11-30-2017
10:18 AM
|
0
|
23
|
2901
|
|
POST
|
Thanks for comment Thomas, I tried to do this in two ways A_ load: function (result) {
result = result.geometry = webMercatorUtils.webMercatorToGeographic(geometries[0]);
....
} and also tried this way B_ var junctionsResultFeatures = result.junctions;
junctionsResultFeatures = featureSet.map(function (s) {
s.geometry = webMercatorUtils.xyToLngLat(s.geometry.x, s.geometry.y, true);
return s;
}) the first way ireturns nothing! no error but also nothing on console log. The second way is really converting the geometry to decimal degree but again I am not seeing the result graphics on map
... View more
11-30-2017
08:36 AM
|
0
|
0
|
2901
|
|
POST
|
Hi Robert, Here is the code I am able to console log the results but not able to display them on the map var graphicsLayerTraceNetworkJunctions, graphicsLayerTraceNetworkEdges;
graphicsLayerTraceNetworkJunctions = new esri.layers.GraphicsLayer();
var rendererTraceNetworkJunctions = new esri.renderer.SimpleRenderer(agsConfig.symbolTraceNetworkJunctions);
graphicsLayerTraceNetworkJunctions.setRenderer(rendererTraceNetworkJunctions);
map.addLayer(graphicsLayerTraceNetworkJunctions);
map.reorderLayer(graphicsLayerTraceNetworkJunctions, 1);
graphicsLayerTraceNetworkEdges = new esri.layers.GraphicsLayer();
var rendererTraceNetworkEdges = new esri.renderer.SimpleRenderer(agsConfig.symbolTraceNetworkEdges);
graphicsLayerTraceNetworkEdges.setRenderer(rendererTraceNetworkEdges);
map.addLayer(graphicsLayerTraceNetworkEdges);
map.reorderLayer(graphicsLayerTraceNetworkEdges, 2);
function solve(traceSolverType, params) {
var gn = 'ElecGeomNet';
esri.request({
url: 'http://localhost/arcgis/rest/services/ENetNADPDWeb/MapServer/exts/GeometricNetworkUtility/GeometricNetworks/1/TraceNetwork/' + traceSolverType,
content: params,
callbackParamName: "callback",
outSR: 4326,
load: function (result) {
//result = result.geometry = webMercatorUtils.webMercatorToGeographic(geometries[0]);
if (traceFlowElement == 'esriFEJunctionsAndEdges') {
var edgesResultFeatures = result.edges;
console.log(edgesResultFeatures);
var edgeGraphics;
for (var j = 0, jl = edgesResultFeatures.length; j < jl; j++) {
var featureSet = edgesResultFeatures[j].features;
for (var i = 0, il = featureSet.length; i < il; i++) {
edgeGraphics = new esri.Graphic(featureSet[i])
graphicsLayerTraceNetworkEdges.add(edgeGraphics);
}
}
var junctionsResultFeatures = result.junctions;
console.log(junctionsResultFeatures);
var junctionsGraphics;
for (var j = 0, jl = junctionsResultFeatures.length; j < jl; j++) {
var featureSet = junctionsResultFeatures[j].features;
for (var i = 0, il = featureSet.length; i < il; i++) {
junctionsGraphics = new esri.Graphic(featureSet[i]);
graphicsLayerTraceNetworkJunctions.add(junctionsGraphics);
}
}
}
}
... View more
11-30-2017
08:31 AM
|
0
|
0
|
2901
|
|
POST
|
Hi Robert, Thanks for reply I change the out spatial to 4326 and as you can see from below I am getting geometry in wkid:4236 but I am getting the X and Y in Meter not in decimal degree! {OBJECTID: 1100} geometry: spatialReference:{wkid: 4326} type:"point" x:-9814834.6714 y:5130507.876800001
... View more
11-29-2017
08:10 PM
|
0
|
2
|
2901
|
|
POST
|
I am using a Map service on ARcGIS Server 10.4.1 which is in this format Spatial Reference: 102100 (3857) Single Fused Map Cache: false Initial Extent: XMin: -9819759.37726215 YMin: 5128008.078704429 XMax: -9809084.764440382 YMax: 5132626.115644935 Spatial Reference: 102100 (3857) Full Extent: XMin: -9819004.6505 YMin: 5125535.589900002 XMax: -9809349.0802 YMax: 5131992.668099999 Spatial Reference: 102100 (3857) Units: esriMeters Now when I query the service it returns the data in Meter format which I can not display back them on the map as new graphics. Can you please let me know how I can change the service configuration or OutUnit in ArcGIS JavaScript API to be in Decimal Degree
... View more
11-29-2017
03:53 PM
|
0
|
34
|
8128
|
|
POST
|
I am able to create token from Generate Token operation on ArcGIS Portal Directory using IP Address of this request's origin parameter like but when I try to achive the token from URL like https://map.geoca.com/portal/sharing/rest/generateToken?username=mapAdmin&password=psw&referer=https://map.geoca.com&f=json I am getting this error message {"error":{"code":405,"messageCode":"GWM_0005","message":"Method not supported.","details":[]}} can you please let me know how I can fix this to get the token?
... View more
11-21-2017
02:05 PM
|
0
|
10
|
33304
|
|
POST
|
Thanks again but what about the "ArcGISDynamicMapServiceLayer" ? do I have to change it to GeometryService? Can we run Network Analysis/ Geometric Network on GeometryService?
... View more
11-15-2017
07:53 AM
|
0
|
1
|
1236
|
|
POST
|
Thanks Robert, Is using GeometryService involves some setting and configuration on ArcGIS Server/Service side as well? Is there any example of showing how to achieve this?
... View more
11-15-2017
07:19 AM
|
0
|
3
|
1236
|
|
POST
|
Using ArcGIS for JavaScript 3.22 I am overlaying an ArcGISDynamicMapServiceLayer from a ArcGIS Server on top of ESRI basemap. While the service is published in the projected coordinate system with Spatial Reference: 102671 (3435) (NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet) the eve.mappoint returns the geometry coordinate in the spatial reference of Web Mercator or Geographic (4326) or 102100. Can you please let me know how I can force the output to be in the Map Service projected format 102671 (3435) ?
... View more
11-14-2017
09:20 PM
|
0
|
5
|
1364
|
|
POST
|
Using ArcGIS API for JavaScript 3.22 I am trying to add Snapping Function on adding Point to a Graphic Layer but bases on an existing ArcGISDynamicMapServiceLayer (snapping to Edges and Vertex in the ArcGISDynamicMapServiceLayer). but looks like the snapping is not functioning. <button id="addP2P">Add Point To Points </button>
<button id="addP2L">Add Point To Lines </button>
<div id="map"></div>
require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/layers/GraphicsLayer",
"esri/graphic",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/Color",
"esri/SnappingManager",
"dojo/keys",
"dojo/domReady!"
],
function(
Map,
FeatureLayer,
ArcGISDynamicMapServiceLayer,
GraphicsLayer,
Graphic,
SimpleMarkerSymbol,
SimpleLineSymbol,
Color,
SnappingManager,
dojoKeys
) {
var map = new Map("map", {
basemap: "topo",
center: [-88.158805, 41.786075],
zoom: 18
});
var P2PLayer = new GraphicsLayer();
var P2LLayer = new GraphicsLayer();
map.addLayer(P2PLayer);
map.addLayer(P2LLayer);
var DLayer = new ArcGISDynamicMapServiceLayer('https://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network/MapServer');
map.addLayer(DLayer);
var symbolPointJFlag = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 10,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 255, 0, 1]), 1), new Color([0, 255, 0, 1]));
$("#addP2P").one("click", function() {
map.on("click", addGraphic);
function addGraphic(evt) {
var sm = new SnappingManager({
alwaysSnap: false,
map: map,
snapKey: dojoKeys.CTRL,
tolerance: 10,
layerInfo: [{
layer: DLayer,
snapToEdge: true,
snapToVertex: true
}]
});
var pgraphic = new Graphic(evt.mapPoint, symbolPointJFlag);
P2PLayer.add(pgraphic);
}
});
});
... View more
10-30-2017
03:22 PM
|
0
|
1
|
1419
|
|
POST
|
Sorry Robert I got confused! so you are saying I can add Point to map without using Draw toolbar AND with using $("#btnAddJunctionFlag").on("click", function () {}); can you please let me know how?
... View more
10-24-2017
02:37 PM
|
0
|
1
|
2625
|
|
POST
|
Thanks again but please do not forget the $("#btnAddJunctionFlag").on("click", function () {}); I am actually calling (enabling) this Point creation functionality on calling a DOM (here # btnAddJunctionFlag) and as you know this is different than map.on("click", function(evt){}) Here is the code in more details toolbar = new Draw(map);
toolbar.activate(Draw.POINT);
toolbar.on("draw-end", addToMap);
function addToMap(evt) {
circle = new Circle({
center: evt.mapPoint,
geodesic: true,
radius: .6,
radiusUnit: "esriMiles"
});
var cgraphic = new Graphic(circle, circleSymb);
graphicsLayerCircle.add(cgraphic);
var pgraphic = new Graphic(evt.geometry, config.symbolPointJFlag);
graphicsLayerPoint.add(pgraphic);
}
Thanks and sorry for confusion
... View more
10-24-2017
02:27 PM
|
0
|
3
|
2625
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-25-2017 08:32 AM | |
| 1 | 07-04-2017 01:47 PM | |
| 1 | 08-15-2017 02:44 PM | |
| 1 | 05-19-2017 02:36 PM | |
| 1 | 02-09-2017 12:37 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-31-2020
08:22 PM
|