|
POST
|
For crying out loud....ahhahahahha... Thats what you get from copy and paste form other Python scripts...ahahah THANKS for the extra set of eyes.....thats embarrassing
... View more
05-11-2020
01:34 PM
|
0
|
1
|
3287
|
|
POST
|
results = arcpy.SelectLayerByLocation_management("counties_lyr", "NEW_SELECTION", 'FIPS2 = 3 OR FIPS2 = 12') ERROR
... View more
05-11-2020
01:24 PM
|
0
|
3
|
3287
|
|
POST
|
Note this is a Feature Class in n SDE SQL db # DEFINE THE COUNTIES FC
arcpy.MakeFeatureLayer_management(r"E:/Projects/County/xxxx.sde/Counties", "counties_lyr")
results = arcpy.SelectLayerByLocation_management("counties_lyr",
"NEW_SELECTION",
"[FURST_JURI]='ACCOMACK'") Ive tried this for Text field "[FURST_JURI]='ACCOMACK' " "FIRST_JURI = 'ACCOMACK' " ' "FIRST_JURI" = 'ACCOMACK' " Ive tried for Int "FIPS2 > 1" ' "FIPS2" > 1' "[FIPS2] > 1" I know the attributes and values exist
... View more
05-11-2020
01:07 PM
|
0
|
0
|
3287
|
|
POST
|
Trying this as well...same similar error...seems to be in the syntax of the where clause... # DEFINE THE COUNTIES FC
arcpy.MakeFeatureLayer_management(r"E:/Projects/County/xxxx.sde/Counties", "counties_lyr")
# SELECT FROM BUFFER PUT INTO RESULTS VARIABLE
results = arcpy.SelectLayerByLocation_management('counties_lyr', 'NEW_SELECTION', 'FIPS2 > 16')
# GET THE FIPS CODES FROM THE RESULTS OF THE SELECTION
rows = arcpy.SearchCursor(results,"","","FIPS2")
for row in rows:
neighborVal = str(row.FIPS2)
print(neighborVal)
... View more
05-11-2020
12:32 PM
|
0
|
1
|
3287
|
|
POST
|
Where am I going wrong here. countiesFeatureClass = r"E:/ArcGISProjects/CountySelection/[email protected]/Counties_1_Dissolved"
queryCounties = arcpy.SelectLayerByAttribute_management(countiesFeatureClass,
'NEW_SELECTION',
'"FIPS2"=3 OR "FIPS2"=12')
# Write the selected features to a new featureclass
arcpy.CopyFeatures_management(queryCounties, 'countiesSelected') Traceback (most recent call last): File "E:\ArcGISProjects\CountySelection\Python\Update_v4.py", line 32, in <module> '"FIPS2"=3 OR "FIPS2"=12') File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 7744, in SelectLayerByAttribute raise e ExecuteError: Failed to execute. Parameters are not valid. The value cannot be a feature class ERROR 000840: The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute).
... View more
05-11-2020
11:52 AM
|
0
|
7
|
3531
|
|
POST
|
Is it possible to control the reference text that accompanies a basemap like you see in ArcMap I have drak-gray basemap but I want to see if I can control the scale of the labeling from the reference labels that associated with the basemap Example something like this -- reference: false, or minScale-reference: 4000000 maxScale-reference: 25000 var mapright = new Map({
basemap: "dark-gray",
layers: [resultsLayer3]
});
... View more
05-11-2020
10:04 AM
|
0
|
2
|
1144
|
|
POST
|
For crying out loud....just the Capital S in both maxScale and minScale minscale: 4000000,
maxscale: 250000,
minScale: 4000000,
maxScale: 250000,
... View more
05-11-2020
09:41 AM
|
1
|
0
|
871
|
|
POST
|
trying to only show my labels between min and max scale.... I get the labels no matter how far zoomed in or how far zoomed out....thoughts? const labelClass = {
// autocasts as new LabelClass()
symbol: {
type: "text", // autocasts as new TextSymbol()
color: "yellow",
font: {
// autocast as new Font()
family: "Playfair Display",
size: 8,
weight: "bold"
}
},
minscale: 4000000,
maxscale: 250000,
labelPlacement: "always-horizontal",
labelExpressionInfo: {
expression: "$feature.FIRST_JURI"
}
};
var UrlWebMercator = "https://xxxx/arcgis/rest/services/DGIF_Test/xxx/FeatureServer/1";
window.countyLayerWebMercator = new FeatureLayer({
url: UrlWebMercator,
outFields: ["*"],
id: "LayerWebMercator",
labelingInfo: [labelClass],
visible: true
});
... View more
05-11-2020
09:12 AM
|
0
|
1
|
893
|
|
POST
|
Oh wait I am never setting the mouseEvtHandler to anything to test against......ahhahahahah....one seond
... View more
05-11-2020
07:31 AM
|
0
|
1
|
742
|
|
POST
|
I am doing this and never getting the alert "1" I get the "start" alert everytime which I should I then get the "2" alert EVERY time....never the "1" alert So that tells me its not setting the mouseEvtHandler to null.... Do I have something wrong? <div id="select-by-Testing" style="height: 20px; width: 100%; padding: 10px 10px 10px 10px;" class="esri-widget esri-widget--button esri-widget esri-interactive" title="identify features">
<span>Click Testing</span>
</div> var mapright = new Map({
basemap: "dark-gray",
//: [countyLayerWebMercator]
layers: [countyLayerWebMercator, resultsLayer3, resultsLayer2, resultsLayer4]
});
var viewright = new MapView({
container: "viewDivright",
map: mapright,
center: [-77.05, 37.53308],
zoom: 7
});
let mouseEvtHandler;
var selectButton2 = document.getElementById("select-by-Testing");
selectButton2.addEventListener("click", function() {
alert("start");
if (mouseEvtHandler) {
alert("1");
mouseEvtHandler.remove();
mouseEvtHandler = null;
} else {
alert("2");
// mouseEvtHandler = viewright.on("click", eventHandler);
}
});
... View more
05-11-2020
07:30 AM
|
0
|
2
|
5942
|
|
POST
|
So if I am reading this correct Click the button.... If should allow the user to click Click the button again and it should set the MouseEvtHandler to NOT allow a click. Click the button again and it should allow the user to click.... let myBtn = document.getElementById("btn");
myBtn.addEventListener("click", function(){
if(mouseEvtHandler){
mouseEvtHandler.remove();
mouseEvtHandler = null;
}else{
mouseEvtHandler = view.on("pointer-down", eventHandler);
}
});
... View more
05-11-2020
06:18 AM
|
0
|
2
|
5942
|
|
POST
|
Looking at it closer I think that is what I am after .... instead of converting to a mouse over or pointer-move I would need someway to cancel the map click ability...that is the part I am not sure of This example seems to be active in both cases....click or hover...I need click not active at all. I want to disable the ability to click after clicking a submit button ... Is there a specific code that disables a the view onClick?
... View more
05-11-2020
06:08 AM
|
0
|
4
|
5942
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|