|
IDEA
|
You could get some ideas from how Esri does their Symbol Playground.
... View more
01-06-2021
12:41 PM
|
0
|
0
|
7587
|
|
POST
|
There's a lot going on in your code that is either redundant or slightly off. I recommend familiarizing yourself with the syntax of FeatureClassToFeatureClass_conversion() Here's a simplified version. See if this runs and does what you want. import arcpy
sde_workspace = r"D:\Users\user\Documents\ArcGIS\Projects\Databases\SDE.sde"
env_gdb = r"W:\My Documents\user\ENV.gdb\ENV"
print("START")
for ds in arcpy.ListDatasets(feature_type="Feature"):
new_name = ds.split(".")[-1]
print("Copying {}".format(new_name))
arcpy.FeatureClassToFeatureClass_conversion(ds, outLocation, new_name)
... View more
01-05-2021
06:45 AM
|
2
|
0
|
2518
|
|
POST
|
Maybe it's included as part of the issue logged as "Editing existing content"?
... View more
12-30-2020
12:07 PM
|
0
|
0
|
1687
|
|
POST
|
You'll want to remove the extra brackets around coords in view.goTo() because it's already an array from the original assignment.
... View more
12-30-2020
12:00 PM
|
1
|
0
|
4936
|
|
POST
|
After creating a post (or reply) with a code block, whenever the post/reply is edited, an extra new line is added above and below the code block. This compounds with repeated edits.
... View more
12-30-2020
11:56 AM
|
0
|
4
|
1695
|
|
POST
|
Are you intending that users choose one (or many) field name values from this input?
... View more
12-30-2020
06:17 AM
|
0
|
1
|
1556
|
|
POST
|
To start simple, ensure the user defined in the gisserver_branch.sde connection has SELECT privileges on the PRP_LandParcels_Ply table. Second, is the table in a different schema (owner) than the user connecting? You may need to specify the schema with the table name in the sql. Like schemaName.PRP_LandParcels_Ply
... View more
12-29-2020
08:52 AM
|
1
|
0
|
2501
|
|
POST
|
You may need to clarify what you're trying to do with an example of what you want the output to look like. You have access to all output fields in the featureSet features so you can get the length (to sum) and the name values all in the same spot. var lengthSum = 0;
var names = [];
layer.queryFeatures(query).then(function(featureSet) {
featureSet.features.forEach(function(feature) {
lengthSum += feature.attributes.lengthFieldName;
names.push(feature.attributes.nameFieldName);
});
});
console.log(`Total length of queried features is ${lengthSum}`);
console.log(`Names of queried features ${names}`); EDIT: Just realized I made a slight error on how to construct the forEach loop. I updated the code to be featureSet.features.forEach and feature.attributes
... View more
12-28-2020
02:01 PM
|
0
|
0
|
2322
|
|
POST
|
var lengthSum = 0;
layer.queryFeatures(query).then(function(featureSet) {
featureSet.features.forEach(function(feature) {
lengthSum += feature.attributes.lengthFieldName
});
});
console.log(lengthSum);
... View more
12-28-2020
01:15 PM
|
1
|
2
|
2340
|
|
POST
|
Reading the documentation, it says "If outStatistics is specified the only other query parameters that should be used are groupByFieldsForStatistics, orderByFields, text, and where." This indicates that the outFields parameter will be ignored. If you want to sum the length field and display the name of all the features used to calculate this sum, you'll need separate queries. Or just query all the features like normal and sum the length yourself (no extra outStatistics query needed).
... View more
12-28-2020
12:37 PM
|
0
|
4
|
2347
|
|
POST
|
I was able to get your code working with some slight alterations to remove extra syntax. <html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="./resources/ol.css">
<link rel="stylesheet" href="./resources/ol3-layerswitcher.css">
<link rel="stylesheet" href="./resources/qgis2web.css">
<!-- THIS SCRIPT DEFINES THE SIZE OF THE MAP -->
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
width: 100%;
height: 300px;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.18/esri/themes/light/main.css">
<script src="https://js.arcgis.com/4.18/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/widgets/BasemapToggle",
"esri/widgets/BasemapGallery",
"dojo/domReady!"
], function(Map, MapView, Graphic, GraphicsLayer, BasemapToggle, BasemapGallery) {
var map = new Map({
basemap: "satellite"
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [19.874268,39.576056], // longitude, latitude
zoom: 16
});
var basemapToggle = new BasemapToggle({
view: view,
nextBasemap: "topo-vector"
});
view.ui.add(basemapToggle, "bottom-left");
var graphicsLayer = new GraphicsLayer();
map.add(graphicsLayer);
var point = {
type: "point",
longitude: '19.874268',
latitude: '39.576056'
};
var simpleMarkerSymbol = {
type: "simple-marker",
color: [226, 119, 40],
outline: {
color: [255, 255, 255],
width: 2
}
};
var pointGraphic = new Graphic({
geometry: point,
symbol: simpleMarkerSymbol
});
graphicsLayer.add(pointGraphic);
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
12-28-2020
09:55 AM
|
1
|
0
|
1235
|
|
POST
|
There's two examples in the hittest() documentation section as well as a link to a sample app using hittest(). In your case, sounds like you want a click event so start with that example. // Get the screen point from the view's click event
view.on("click", function (event) {
// Search for graphics at the clicked location. View events can be used
// as screen locations as they expose an x,y coordinate that conforms
// to the ScreenPoint definition.
view.hitTest(event).then(function (response) {
if (response.results.length) {
var graphic = response.results.filter(function (result) {
// check if the graphic belongs to the layer of interest
return result.graphic.layer === myLayer;
})[0].graphic;
// do something with the result graphic
console.log(graphic.attributes);
}
});
}); Then you can display the mapPoint from HitTestResult as a graphic.
... View more
12-28-2020
06:48 AM
|
0
|
0
|
3544
|
|
POST
|
The hittest() method of MapView will have a mapPoint property in the HitTestResult that is returned. You can use the latitude and longitude properties of the point.
... View more
12-28-2020
06:28 AM
|
2
|
2
|
3560
|
|
POST
|
It does seem like locationToAddress() should work but I've never used it. Maybe try a separate call to the ArcGIS REST API. reverseGeocode—ArcGIS REST API | ArcGIS for Developers
... View more
12-24-2020
06:18 AM
|
1
|
0
|
1572
|
|
POST
|
You could try a unicode character for an arrow. Amp What search “arrow” Unicode Characters & Entities (amp-what.com)
... View more
12-22-2020
06:34 AM
|
2
|
1
|
3509
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 1 | 10-23-2025 03:53 PM | |
| 1 | 04-28-2026 07:25 AM | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM |