|
POST
|
You are right but in this case I need to also display the Point Graphic on map so as you can see I have two graphics layer
... View more
10-24-2017
02:11 PM
|
0
|
1
|
2599
|
|
POST
|
Thanks Rober, it was a Typo there but what I am trying to do is Adding a Point into Map using Toolbar facility and also Drawing a Circle around it without using Toolbar Utility
... View more
10-24-2017
01:15 PM
|
0
|
3
|
2599
|
|
POST
|
can you please take a look at this snippet and let me know why I am getting this Error message Uncaught TypeError: Cannot read property 'isWebMercator' of undefined from the Circle.js module? var graphicsLayerPoint = new esri.layers.GraphicsLayer();
map.addLayer(graphicsLayerPoint);
var graphicsLayerCircle = new esri.layers.GraphicsLayer();
map.addLayer(graphicsLayerCircle);
$("#btnAddJunctionFlag").on("click", function () {
toolbar = new Draw(map);
toolbar.activate(Draw.POINT);
map.hideZoomSlider();
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);
}
... View more
10-24-2017
12:05 PM
|
0
|
9
|
3062
|
|
POST
|
Can you please let me know which table(s) of Enterprise Geodatabase on top of SQL Server contains contains information about layer ID showing on service URL "layers": [
{
"id": 0,
"name": "Electric.DBO.Open_Point"
},
{
"id": 1,
"name": "Electric.DBO.Fuse"
},
{
"id": 2,
"name": "Electric.DBO.Circuit_Breaker"
},
{
"id": 3,
"name": "Electric.DBO.Recloser"
},
{
"id": 4,
"name": "Electric.DBO.Switch"
},
... and how they are connected (has reationship) with physical tables in Geodatabase?
... View more
10-10-2017
02:20 PM
|
0
|
3
|
1384
|
|
POST
|
Using ArcGIS JavaScript API 3.21 and This Demo Fiddle I am trying to create a buffed area on click event but apparently this is not showing any graphic on bufferLayer graphics Layer require([
"esri/map",
"esri/SpatialReference",
"esri/graphic",
"esri/layers/GraphicsLayer",
"esri/Color",
"esri/geometry/Point",
"esri/geometry/geometryEngine",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/renderers/SimpleRenderer",
"dojo/domReady!"
],
function(
Map,
SpatialReference,
Graphic,
GraphicsLayer,
Color,
Point,
geometryEngine,
SimpleMarkerSymbol,
SimpleLineSymbol,
SimpleFillSymbol,
SimpleRenderer
) {
var map = new Map("map", {
basemap: "streets",
center: [-122.4, 37.785],
zoom: 14,
});
var buffSymb = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_NULL,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SHORTDASHDOTDOT,
new Color([105, 105, 105]),
2
), new Color([255, 255, 0, 0.25])
);
var graphicsLayer = new GraphicsLayer();
var bufferLayer = new GraphicsLayer();
map.addLayer(graphicsLayer);
map.on("click", function(evt){
var buffer = geometryEngine.geodesicBuffer(
new Point(evt.mapPoint.x, evt.mapPoint.y),
1000,
"meters"
);
bufferLayer.add(new Graphic(buffer, buffSymb));
map.addLayer(bufferLayer);
});
}); I am not getting any error message but also no result back! can you please take a look at this and let me know what I am doing wrong?
... View more
09-29-2017
01:58 PM
|
0
|
2
|
1155
|
|
POST
|
Can you please take a look at this Demo and code and let me know how I can get a list of point graphics based on the closest distance to the click event position? require([
"esri/map",
"esri/SpatialReference",
"esri/graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/Point",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleFillSymbol",
"dojo/domReady!"
],
function(
Map,
SpatialReference,
Graphic,
GraphicsLayer,
Point,
SimpleMarkerSymbol,
SimpleFillSymbol
) {
var map = new Map("map", {
basemap: "streets",
center: [-122.4, 37.785],
zoom: 14,
});
var graphicsLayer = new GraphicsLayer();
var Symbol = new SimpleMarkerSymbol();
graphicsLayer.add(new Graphic(new Point(-122.4, 37.777, new SpatialReference({ wkid: 4326 })), Symbol));
graphicsLayer.add(new Graphic(new Point(-122.4, 37.785, new SpatialReference({ wkid: 4326 })), Symbol));
graphicsLayer.add(new Graphic(new Point(-122.39,37.785, new SpatialReference({ wkid: 4326 })), Symbol));
graphicsLayer.add(new Graphic(new Point(-122.41,37.785, new SpatialReference({ wkid: 4326 })), Symbol));
graphicsLayer.add(new Graphic(new Point(-122.4, 37.793, new SpatialReference({ wkid: 4326 })), Symbol));
map.addLayer(graphicsLayer);
map.on("click", function(evt){ });
});
... View more
09-28-2017
02:00 PM
|
0
|
2
|
1839
|
|
POST
|
I have two ArcGIS Geocoding Services but they have different Service Descriptions on Single Line Address Field: part For This Service I have SingleLine but for This One it is Single Line Input Can you please let me know why they are different and How I can configure them on Server or locator side?
... View more
09-27-2017
03:00 PM
|
0
|
1
|
1003
|
|
POST
|
and when I try to get map spatial Reference console.log(map.spatialReference); it outputs undefine
... View more
09-27-2017
11:57 AM
|
0
|
2
|
1883
|
|
POST
|
You are right it is actually adding the points to graphiclayer but somewhere in Africa!. Is there any way to update the spatialRefrence?
... View more
09-27-2017
11:50 AM
|
0
|
0
|
1883
|
|
POST
|
Sure here you are var map;
require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/layers/GraphicsLayer",
"esri/tasks/query",
'esri/tasks/QueryTask',
'dojo/_base/array',
"esri/graphic",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/renderers/SimpleRenderer",
"esri/Color",
"dojo/dom",
"dojo/domReady!"
], function(
Map, FeatureLayer, GraphicsLayer, Query, QueryTask, array, Graphic, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Color, dom
) {
map = new Map("mapDiv", {
basemap: "streets",
center: [-88.155000, 41.784042],
zoom: 14,
slider: false
});
var graphicsLayer = new GraphicsLayer();
var markerSymbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_SQUARE, 10, null, new Color([50,50,255])
);
var queryTask = new QueryTask("https://server.domain.com/arcgis/rest/services/ElectricData/FeatureServer/3");
var query = new Query();
query.where = "1=1";
query.returnGeometry = true;
query.outSpatialReference = map.spatialReference;
query.outFields = [
"CreationUser"
];
queryTask.execute(query).then(onQuerySuccess, onError);
function onQuerySuccess(featureSet) {
array.forEach(featureSet.features, function(feature) {
feature.setSymbol(markerSymbol);
graphicsLayer.add(feature);
});
console.log(featureSet.features)
map.addLayer(graphicsLayer);
}
function onError(error) {
console.error('An error ocurred in the query: ', error);
}
});
... View more
09-27-2017
11:42 AM
|
0
|
1
|
1883
|
|
POST
|
I also tried to console.log() the results console.log(featureSet.features[i]) which I am getting this points {type: "point", x: 1034892.977614373, y: 1871653.8816519529, spatialReference{wkid: 102671, latestWkid: 3435}}
... View more
09-27-2017
11:31 AM
|
0
|
1
|
1883
|
|
POST
|
Thanks for comment Robert I updated the code as: query.where = "1=1";
query.returnGeometry = true;
query.outSpatialReference = map.spatialReference;
query.outFields = [
"CreationUser"
]; but still noting on the map!
... View more
09-27-2017
11:21 AM
|
0
|
1
|
1883
|
|
POST
|
Using ArcGIS API 3.21 and following code I am trying to populate the result of a Query Task on map by populating the result featureSet on GraphicLayer but I am not getting any thing in result. and No error on Console. Can you please let me know what I am doing wrong? var map;
require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/layers/GraphicsLayer",
"esri/tasks/query",
'esri/tasks/QueryTask',
'dojo/_base/array',
"esri/graphic",
"esri/symbols/SimpleMarkerSymbol",
"esri/Color",
"dojo/dom",
"dojo/domReady!"
], function(
Map, FeatureLayer, GraphicsLayer, Query, QueryTask, array, Graphic, SimpleMarkerSymbol, Color, dom
) {
map = new Map("mapDiv", {
basemap: "streets",
center: [-88.155000, 41.784042],
zoom: 14,
slider: false
});
var graphicsLayer = new GraphicsLayer();
var markerSymbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_SQUARE, 10, null, new Color([50,50,255])
);
var queryTask = new QueryTask("https://server.domain.com/arcgis/rest/services/ElectricData/FeatureServer/3");
var query = new Query();
query.where = "1=1";
query.returnGeometry = true;
query.outFields = [ "CreationUser"];
queryTask.execute(query).then(onQuerySuccess, onError);
function onQuerySuccess(featureSet) {
array.forEach(featureSet.features, function(feature) {
feature.setSymbol(markerSymbol);
graphicsLayer.add(feature);
});
map.addLayer(graphicsLayer);
}
function onError(error) {
console.error('An error ocurred in the query: ', error);
}
});
... View more
09-27-2017
10:07 AM
|
0
|
12
|
3486
|
|
POST
|
Using ArcGIS JavaScript API 3.21 I need to grab all Points on a Server. The code works for me with Query.where clause at query.where = "FeederID = 'RMT001'"; but as I said I need to get all Points. I tried to run the query without any Query.where statement but not getting back anything. can you please let me know how to get all Points? function execute () {
var query = new Query();
query.where = "FeederID = 'RMT001'";
query.returnGeometry = true;
query.outFields = [ "CreationUser", "FName" ];
queryTask.execute(query, showResults);
}
... View more
09-27-2017
09:00 AM
|
0
|
4
|
1606
|
| 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
|