|
POST
|
How to hide a map service layer? For a map service with 2 dozens of layers, I want to hide one of them from the TOC. Is there is an easy way to do it? Thanks.
... View more
01-15-2019
11:00 AM
|
0
|
5
|
2289
|
|
POST
|
From MapImageLayer - Toggle sublayer visibility | ArcGIS API for JavaScript 4.10 , I know it can use sublayers in V4.1. However for the V3.2x, I am still not able to do something like that dynamically check on/off a layer using JS code. Could you provide a sample or some detail? Thanks.
... View more
01-10-2019
05:03 AM
|
0
|
3
|
2794
|
|
POST
|
Tim: Thanks for your response. I can access to the layer. But I can't go to the next level. For instance, in my App, there are 2 map service layers. The layer0 is the basemap from ESRI, the other one contains 2 dozens of layers. How can a sublayer be accessed? E.g. var sLyr = this.map.getLayer( ???); or var _layer = this.map.getLayer( this.maplayerId[1]; for (var i = 0; i < _layer.layerInfos.length; i++) { var lyr = this.map.getLayer( ???); } Thanks if you can provide additional help.
... View more
01-09-2019
11:26 AM
|
0
|
1
|
2794
|
|
POST
|
In my JavaScript App, there are 5 Group layers, each of which contains 4-5 sub-layers, are loaded from an ArcGIS server. In debugging, I check the Object this.map, but I don't know how to loop the service layers, e.g. How to Dynamically Check a service layer is checked on/off. Thanks if you can help.
... View more
01-08-2019
06:31 AM
|
0
|
7
|
3095
|
|
POST
|
Changed to Function FindLabel ( [_PID], [_NAME] ) if [_PID] <> [_NAME] then FindLabel = [_PID] & "/" & [_NAME] else FindLabel = [_PID] end if end function Then it works. Thanks for your review.
... View more
12-24-2018
08:45 AM
|
0
|
1
|
769
|
|
POST
|
I need to display Label w/ 2 fields' values like that [_PID] & "/" & [_NAME]. Its VBScript looks like that below: [_PID] & "/" & [_NAME] But if [_PID] == [_NAME], I only need to display [_PID]. I tried the VBScript below: Function FindLabel ( [_PID] ) dim newString as string newString = "" if [_PID] == [_NAME] then newString = [_PID] else newString = [_PID] & "/" & [_NAME] end if However, I receive error: "Carriage returns are not allowed in simple expressions". How this problem can be fixed? Thanks if you can help.
... View more
12-24-2018
08:25 AM
|
0
|
2
|
929
|
|
POST
|
Revised the code as var ar2D = new Array(); for (var j = 0; j < p_.length; j++) { var ar1D = [p_ [0], p_ [1]]; ar2D.push(ar1D); } var polygon = new esri.geometry.Polygon(new esri.SpatialReference( { wkid: 102100 } ) ); polygon.addRing( ar2D ); var pt = new esri.geometry.Point(ar2D[0], new esri.SpatialReference({ wkid: 102100 })); Then polygon.contains(pt) returns true. Thanks to Robert, Dan and John.
... View more
03-12-2018
06:03 AM
|
1
|
1
|
1814
|
|
POST
|
I created a polygon from ar2D. var polygon_ = new esri.geometry.Polygon({ "rings": ar2D, "spatialReference": { "wkid": 102100 } }); var extent = polygon_.getExtent(); console.log("polygonExtent", extent); var bContains = polygon_.contains(new esri.geometry.Point( ar2D[0] )); ------------------ However, the Results show: the values of extent.xmax,extent.xmin,extent.ymax,extent.ymin are NaN bContains = false Unknwon why? Thanks if you can help.
... View more
03-09-2018
11:47 AM
|
0
|
5
|
2227
|
|
POST
|
Rebert: Got an additional prob. (see my email to you). Could you take a look? Thanks.
... View more
03-08-2018
10:08 AM
|
0
|
0
|
1552
|
|
POST
|
Got selected_Poly != esri.geometry.Polygon. The I tried var ar2D = new Array(); for (var j=0; j < selected_Poly.length; j++) { var ar1D = [ selected_Poly [0], selected_Poly [1] ]; ar2D.push(ar1D); } polygon = new esri.geometry.Polygon(); polygon.addRing(ar2D); Then, I checked the polygon object: polygon _ring: 0 cache: undefined rings: [-8574575.3238,4706898.530699998,-8574717.6555,4706897.306000002,......] spatialReference: {...} type: "polygon" However, still get polygon.geometry != esri.geometry.Polygon What's wrong in my code? Thanks.
... View more
03-07-2018
08:43 AM
|
0
|
2
|
1552
|
|
POST
|
also in debugging selected_Poly.contains(new esri.geometry.Point([-76.99, 38.88])) got Object doesn't support property or method 'contains' where selected_ContractSection.rings [-8574575.3238,4706898.530699998,-8574717.6555,4706897.306000002,-8574736.575,4706897.310400002,-8575245.9761,4706912.5276999995,-8575227.622,4707114.234399997,-8575227.5562,4707119.869999997,-8575219.9439,4707238.998999998,-8574736.4339,4707222.973899998,-8574717.4695,4707222.967699997,-8574503.5524,4707224.6489999965,-8574507.9585,4707120.172899999,-8574507.9603,4707114.672899999,-8574535.2586,4706976.1853,-8574575.3238,4706898.530699998] __proto__: [] length: 1 [0]: [...]
... View more
03-06-2018
12:40 PM
|
0
|
4
|
1552
|
|
POST
|
selected_Poly = response.features.geometry; //.rings[0]; var polygonSymbol = new esri.symbol.SimpleFillSymbol( esri.symbol.SimpleFillSymbol.STYLE_SOLID, // or "solid", new esri.symbol.SimpleLineSymbol("solid", new esri.Color([232, 104, 80]), 2), new esri.Color([232, 104, 80, 0.25]) ); var graphic = new esri.Graphic(selected_Poly, polygonSymbol); // got attributes, geometry, and symbol null value; what is wrong here? Thanks. graphic.setSymbol(polygonSymbol); ...
... View more
03-06-2018
12:31 PM
|
0
|
5
|
1552
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-18-2023 10:02 AM | |
| 3 | 07-14-2023 12:29 PM | |
| 1 | 04-02-2021 12:16 PM | |
| 1 | 07-24-2017 11:31 AM | |
| 1 | 04-04-2016 03:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-01-2025
11:58 AM
|