|
POST
|
I am using query task to select only features within a drawn polygon. executeRequestByShape: function () {
var deffByShape = new Deferred();
var queryTask = new QueryTask(this.layerUrl);
var query = new Query();
query.returnGeometry = true;
query.geometry = this.geometry;
query.spatialRelationShip = Query.SPATIAL_REL_WITHIN;
query.outFields = ["*"];
var queryResults = queryTask.execute(query);
var promiseResult = all([queryResults])
.then(function (r) {
deffByShape.resolve(r);
})
return deffByShape.promise;
}
but this code is returning features that intersect the drawn polygon. Any idea?
... View more
03-30-2016
06:51 AM
|
1
|
4
|
3415
|
|
POST
|
Thank you Tom, this is a real good start. I created a repository on Github with a demo sample. There is an issue though when switching the measurement units other than meters. you can try view the demo here https://github.com/rhyck-m/Drawing-circle-with-radius-measurement-display
... View more
02-27-2016
08:40 AM
|
0
|
1
|
2569
|
|
POST
|
is anybody ever done this? I haven't tried the following logic: var centerPt=null;
//description:get distance between ptB and centerPt //return: number
function getDistance(ptB)
{
if(centerPt==null||centerPt.mapPoint==null)
{
console.log("unexpected para,function getDistance()");
return "";
}
var ptA=centerPt.mapPoint;
return Math.sqrt(Math.pow(ptA.x-ptB.x,2)+Math.pow(ptA.y-ptB.y,2));
}
// get the center point
map.on("click", function(evt){
centerPt = evt.mapPoint;
})
//onDragStart, record the centerPt
map.on("mouse-drag-start",function(evt)
{
console.log("dragStart triggered");
centerPt=evt;
});
//onDrag, calculate distance between currentPoint and centerPt
map.on("mouse-drag",
function(evt){
var radius=getDistance(evt.mapPoint);
console.log("radius is:"+radius);
})
... View more
02-26-2016
10:53 AM
|
0
|
3
|
4965
|
|
POST
|
I am struggling on the parameters for Creating a TIN. I have two layers as Input . here is what I am trying to accomplish but no luck. I am using C#: // 1. Create Tin
// CreateTin_3d (out_tin, {spatial_reference}, {in_features}, {constrained_delaunay})
CreateTin createTin = new CreateTin();
createTin.out_tin = string.Format("{0}{1}", "C:/FloodPlainMapping/WorkSpace01/", fieldName + "_tin");
createTin.spatial_reference = "PROJCS['NAD_1983_CORS96_StatePlane_Ohio_North_FIPS_3401_Ft_US',GEOGCS['GCS_NAD_1983_CORS96',DATUM['D_NAD_1983_CORS96',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',1968500.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-82.5],PARAMETER['Standard_Parallel_1',40.43333333333333],PARAMETER['Standard_Parallel_2',41.7],PARAMETER['Latitude_Of_Origin',39.66666666666666],UNIT['Foot_US',0.3048006096012192]]";
createTin.in_features = string.Format("{0} {1} Hard_Line <None>; {2} <None> Soft_Clip <None>", fcLayerLinesIN, fieldName, fcLayerPolyIN);
createTin.constrained_delaunay = "DELAUNAY";
... View more
02-11-2016
03:51 PM
|
0
|
0
|
1585
|
|
POST
|
This is good for one input feature, what if I have two? [[in_feature_class, height_field, SF_type, tag_value], [in_feature-class2, height_field, SF_type, tag_value]] tried this but no luck.
... View more
02-11-2016
07:06 AM
|
0
|
0
|
2293
|
|
POST
|
Thank you Robert for your reply, I did add the index field in Arc Catalog, the waiting time did change a little bit, now down to about 3 seconds before showing suggestions. I have about 66388 records. I am wondering if the number of rows has to do with this.
... View more
02-03-2016
08:46 AM
|
0
|
1
|
935
|
|
POST
|
Why is my search widget so slow? it takes about 5 seconds, sometimes more to return suggestions even thought the service has the capability support pagination to true. here is the code: var searchAddress = new Search({
enableButtonMode: false,
enableLabel: false,
enableInfoWindow: true,
showInfoWindowOnSelect: true,
map: map
}, "adrSearch");
var sourcesAddr = []; //search.get("sources");
sourcesAddr.push({
featureLayer: new FeatureLayer(".../AddressTypes/MapServer/0"),
searchFields: ["LSN"],
displayField: "LSN",
exactMatch: false,
name: "Address",
outFields: ["*"],
placeholder: "Search address",
maxResults: 25,
maxSuggestions: 25,
enableSuggestions: true,
minCharacters: 3
});
searchAddress.set("sources", sourcesAddr);
searchAddress.startup(); here is the snapshot of service capabilities:
... View more
02-03-2016
06:22 AM
|
0
|
3
|
2355
|
|
POST
|
Ken is absolutely right! that fixed the issue. Thank you.
... View more
01-22-2016
08:04 AM
|
0
|
0
|
1258
|
|
POST
|
Yes, Adrian, after clearing all the caches and browser history, the toc does load the legend just fine. I don't understand what's going on the cache and the TOC. I going to try Ken idea.. and see Thanks
... View more
01-22-2016
07:51 AM
|
0
|
0
|
1258
|
|
POST
|
The toc widget is acting strange. it is not loading. sometimes after multiple refresh, it loads fine. here is the error message I get: here is my code //define Proxy
esriConfig.defaults.io.proxyUrl = "proxy.ashx";
esriConfig.defaults.io.alwaysUseProxy = false;
//============================
map.on("load", function (evt) {
mapReady();
getLayers();
});
//LEGEND CHECKBOX
function getLayers() {
map.on("layer-add-result", function (evt) {
// console.log(evt);
try {
toc = new TOC({
map: map,
layerInfos: [{
layer: layerName,
title: "Layers",
collapsed: false,
slider: true
}]
}, 'legendDiv');
toc.startup();
}
catch (ex) {
// console(ex.toString());
}
})
} I am not sure why the toc is not loading correctly. Any ideas? The error message is : message: "Unable to load http://www.arcgis.com/sharing/tools/legend?soapUrl=http
... View more
01-22-2016
06:47 AM
|
0
|
5
|
3137
|
|
POST
|
Yes, I see. But I am adding the TiledMapServiceLayer when the end user clicks on a button to see those. Is there a way to change the order of the TiledMap?
... View more
12-15-2015
06:45 AM
|
0
|
2
|
1225
|
|
POST
|
Is it possible to have a dynamic layer on top of a tiled map service layer? In this code, only the tiled map is visible. var dyn = new ArcGISDynamicMapServiceLayer(url);
map.addLayer(dyn);
tiled = new ArcGISTiledMapServiceLayer(url);
map.addLayer(tiled);
... View more
12-14-2015
02:13 PM
|
1
|
4
|
2949
|
|
POST
|
Thank you, this fixed one service that I host myself, but not for the other one hosted by a different party. I am assuming this option is not enabled. I guess I have to find a work around for this one! Any suggestions please?
... View more
12-07-2015
11:35 AM
|
0
|
0
|
1171
|
|
POST
|
I am trying to render a layer within ArcGISDynamicMapServiceLayer as per this API: ArcGISDynamicMapServiceLayer | API Reference | ArcGIS API for JavaScript This code is not working. //Rendering the parcels symbology to black
var parcelSymbol = new SimpleFillSymbol().setStyle(SimpleFillSymbol.STYLE_NULL);
parcelSymbol.outline.setStyle(SimpleLineSymbol.STYLE_SOLID);
parcelSymbol.outline.setWidth(1);
parcelSymbol.outline.setColor(new Color([0, 0, 0]));
var dynamicData = new ArcGISDynamicMapServiceLayer(".../MapServer");
var newrenderer = new SimpleRenderer(parcelSymbol);
var optionsArray = [];
var drawingOptions = new esri.layers.LayerDrawingOptions();
drawingOptions.renderer = newrenderer;
optionsArray[1] = drawingOptions;
dynamicData.setLayerDrawingOptions(optionsArray);
map.addLayer(dynamicData);
... View more
12-07-2015
10:47 AM
|
0
|
2
|
3925
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-12-2024 07:03 AM | |
| 1 | 12-11-2024 02:20 PM | |
| 2 | 06-27-2023 09:06 PM | |
| 1 | 12-17-2021 08:58 AM | |
| 3 | 12-17-2021 09:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2024
05:34 PM
|