POST
|
Thanks for the input Brian. I haven't updated to that version yet, but as my update to my post explains.....turns out it is a PICNIC issue and not the software. =] PICNIC = Problem In Chair Not In Computer
... View more
03-15-2019
05:58 AM
|
1
|
1
|
1745
|
POST
|
UPDATE: WOW, do I feel like a complete tool. Looks like I can't delete this post so I figured the best way to save face is by providing an update regarding my "supposed" issue. Turns out the reason I was getting my error is because I was trying to geocode addresses on an empty table, which then produced an empty input class, which I then was trying to calculate geometry on..... =[ So, for anyone else that may come across this issue....actually look at the layer that is giving you the error, rather than, like me, jumping to huge conclusions that the program sucks and it's sole purpose is to ruin your day. That is all. =] ======================================================================================= Clearly, I am a tad frustrated. =[ After updating to Pro 2.3 I am suddenly unable to to calculate geometry on a File Geodatabase Feature Class because every time I do I receive the error: "Input feature class is not registered as versioned" I click the handy error link and it takes me to a page that explains how to register your feature class as versioned.....but I don't need it to be! Also, it clearly states that " File geodatabases don't support versioning. " Soooooooo....... I have checked the settings in arcgis Pro and do not see anything that allows me to declare that I want to work with Non-Versioned data. This is really killing me as it has brought to a complete halt a major, daily task, that I need to run. Any input/guidance is greatly appreciated. Thanks, Mark
... View more
03-15-2019
05:38 AM
|
2
|
8
|
2848
|
POST
|
Good Morning, I have reached the limit of what I can do with my Operations Dashboard, I realize, now, that I should have actually started with a Web App instead (waaaaaayyyyy more customizable). =] So, I was wondering if anyone has ever taken an Ops Dashboard and recreated the same functionality in a Web App? My OpsDash has a lot of filters whose actions affect various elements within the display (is this something a web app could do?). Just wondering. Any guidance/input is greatly appreciated. Mark
... View more
03-05-2019
09:00 AM
|
1
|
0
|
257
|
POST
|
Aw man, I feel like a complete tool. You responded so fast! Thank you my friend. Keep being awesome! Mark
... View more
02-12-2019
11:21 AM
|
0
|
0
|
929
|
POST
|
Boss: "Can filter the feature layer and then have it zoom in to that filtered section?" Me: "For sure, shouldn't be a problem" And so, here I am. For the life of me, I cannot get what seems like it should be a simple task to work. The filtering of the feature layer is accomplished using the defintionExpression. So with that the map loads and the only polygon visible is what matches the defintionExpression. However, what I have failed to figure out, is how I can get the map to zoom into and center on that visible polygon. Here is a link to the codepen for some understanding of what I am trying to accomplish. You will notice in the pen that the visible polygon is not centered. temp_div_map Any and all help is immensely appreciated. Mark
... View more
02-12-2019
10:47 AM
|
0
|
2
|
1096
|
IDEA
|
I came upon this by googling "arcgis operations dashboard clear all filters", since I was hoping to be able to achieve such a thing. Guess that isn't possible yet. =[ Please introduce this functionality!!!
... View more
01-09-2019
06:47 AM
|
0
|
0
|
5777
|
POST
|
Ah ok, so if any of my scripts call the mapping side of things then I will need an actual project file to reference?
... View more
10-24-2018
06:08 AM
|
0
|
2
|
1123
|
POST
|
I have always ended up creating python scripts for automation against existing map or project files (for ArcGIS Pro). What I am wondering though is if python scripts using arcpy can be run against a temporary project file, as well as a temporary geodatabase file? Or, does there have to be a project file already created in order to utilize arcpy? Thanks, Mark
... View more
10-24-2018
04:14 AM
|
0
|
4
|
1250
|
POST
|
you sir are an absolute GENIUS! Thank you! That worked perfectly!!
... View more
08-01-2018
05:28 PM
|
0
|
1
|
1407
|
POST
|
I was just wondering if the ArcGIS Python API can be used to change the order of the layers in a feature service? Thanks, Mark
... View more
08-01-2018
04:12 PM
|
0
|
0
|
279
|
POST
|
I have created a python script that takes csv files, converts them into feature class and then adds them to the map. I am using ArcGIS Pro so the function used is: arcpy.management.XYTableToPoint(stabbings_in_table, stabbings_out_feature_class,stabbings_x_coords, stabbings_y_coords, stabbings_z_coords,arcpy.SpatialReference(2031))
I run this code two more times for the other two csv files I have. So, in the end my Contents section of the map has three layers in total: Homicides, Shootings, Stabbings From there I then create the service definition and upload it to our internal Portal. Here is my problem. No matter what order I create the feature classes the Contents pane always ends up listing them in alphabetical order, which then causes the service definition/feature service to list them in alphabetical order as well. The order I need is: [0] Stabbings [1] Shootings [2] Homicides I know that inside of the actual map file you can click and drag on the layers to reorder them, but can this be done programmatically? My hope is that as long as the layers are in the order I need then they will stay in that order when the feature service is created. Any help is greatly appreciated.
... View more
08-01-2018
04:10 PM
|
0
|
3
|
1775
|
POST
|
Thanks for the response John. I took a look at that url and was able to reduce it to the main parts that I need, but I still find myself not being able to add the results to the map. Here is my version of the code from the url you provided: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Query features from a FeatureLayer - 4.8</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.8/esri/css/main.css">
<script src="https://js.arcgis.com/4.8/"></script>
<style>
html,
body,
#viewDiv {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
#infoDiv {
background-color: white;
color: black;
padding: 6px;
width: 400px;
}
#results {
font-weight: bolder;
}
</style>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/layers/GraphicsLayer",
"esri/geometry/geometryEngine",
"esri/Graphic",
"dojo/on",
"dojo/dom",
"dojo/dom-construct",
"dojo/domReady!"
],
function(
Map, MapView,
FeatureLayer,
GraphicsLayer,
geometryEngine,
Graphic,
on, dom, domConstruct
) {
var occsUrl =
"https://services.arcgis.com/S9th0jAJ7bqgIRjw/ArcGIS/rest/services/YTD_Crime/FeatureServer/0";
var queryOccs = dom.byId("query-occs");
// occurrences
var occsLayer = new FeatureLayer({
url: occsUrl,
outFields: ["*"],
visible: false
});
// GraphicsLayer for displaying results
var resultsLayer = new GraphicsLayer();
var map = new Map({
basemap: "dark-gray",
//layers: [wellsLayer, quakesLayer, resultsLayer]
layers: [resultsLayer]
});
var view = new MapView({
container: "viewDiv",
map: map,
zoom: 10,
center: [-79.3832, 43.6532]
});
view.ui.add("infoDiv", "top-right");
on(queryOccs, "click", function() {
queryOccurrences()
.then(displayResults);
});
function queryOccurrences() {
var query = occsLayer.createQuery();
// query.returnGeometry = true;
//query.outFields = ["*"];
query.where = "mci_category = 'Shooting'";
// query.geometry = wellBuffer;
// query.spatialRelationship = "intersects";
return occsLayer.queryFeatures(query);
}
// display the query results in the
// view and print the number of results to the DOM
function displayResults(results) {
resultsLayer.removeAll();
var features = results.features.map(function(graphic) {
graphic.symbol = {
type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
style: "diamond",
size: 6.5,
color: "darkorange"
};
return graphic;
});
var numOccs = features.length;
dom.byId("results").innerHTML = numOccs + " occurrences found";
resultsLayer.addMany(features);
}
});
</script>
</head>
<body>
<div id="viewDiv"></div>
<div id="infoDiv">
<button id="query-occs">Query Occurrences</button>
<br>
<div id="results"></div>
</div>
</body>
</html> Any further insight is greatly appreciated. I will try and add the above code as a file to the original post
... View more
07-25-2018
08:26 PM
|
0
|
1
|
1187
|
POST
|
ok, i have given this the old college try but have reached a road block that I cannot seem to get past. I have written the following code (added below as well as attached to this post) and am able to properly execute the QueryTask (as per the console output), but what I haven't been able to figure out is how to take the results, create a new layer from those results, and then add that layer to the map (i.e. a layer showing each point as a pin on the map). Any guidance, help, etc. is immensely appreciated. <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>API Demo for Crime App API</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.8/esri/css/main.css">
<script src="https://js.arcgis.com/4.8/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="viewDiv"></div>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/tasks/QueryTask",
"esri/tasks/support/Query",
"dojo/on",
"dojo/dom",
"dojo/domReady!"
], function(
Map,
MapView,
FeatureLayer,
QueryTask,
Query,
Popup,
Search,
on,
dom
) { //TOP of REQUIRE
// Code starts here
var ftLayer = new FeatureLayer(
{
url: "https://services.arcgis.com/S9th0jAJ7bqgIRjw/ArcGIS/rest/services/YTD_Crime/FeatureServer/0",
outFields: ["*"],
definitionExpression:"mci_category = 'Shooting'"
});
var qryLayerUrl = "https://services.arcgis.com/S9th0jAJ7bqgIRjw/ArcGIS/rest/services/YTD_Crime/FeatureServer/0";
var queryTask = new QueryTask({
url: qryLayerUrl
});
var query = new Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.where = "mci_category = 'Shooting'";
queryTask.execute(query).then(function(results){
console.log(results.features);
});
queryTask.executeForCount(query).then(function(results){
console.log(results);
});
// Create the map
var map = new Map({
basemap: "streets"
});
// Create the view
var view = new MapView({
container: "viewDiv",
map: map,
zoom: 10,
center: [-79.3832, 43.6532]
});
});
</script>
</body>
</html> Thanks, Mark
... View more
07-25-2018
05:06 PM
|
0
|
5
|
1925
|
Title | Kudos | Posted |
---|---|---|
1 | 05-15-2019 09:46 AM | |
1 | 03-10-2020 06:26 AM | |
2 | 09-06-2019 06:49 AM | |
2 | 03-15-2019 05:38 AM | |
1 | 03-15-2019 05:58 AM |
Online Status |
Offline
|
Date Last Visited |
04-28-2022
10:25 AM
|