|
POST
|
I am brand new to Workforce and exploring how we may integrate it with existing surveys we have created with Survey123. In particular, we use both new and repeat surveys. Based on first glance, the integration with Workforce always appears to create a new survey at the location. Is there a way to insure it creates a repeat survey if a survey already exists for this location (short of closing the Survey, then selecting the point from the inbox)?
... View more
05-27-2019
01:50 PM
|
0
|
0
|
538
|
|
POST
|
This is great. I will look into this further and report back on my success or failure.
... View more
05-17-2019
03:19 PM
|
0
|
1
|
4564
|
|
POST
|
Of course, I was hoping to hear otherwise, but this is nonetheless useful information. Thank you.
... View more
05-14-2019
12:27 PM
|
0
|
0
|
4564
|
|
POST
|
I have been searching ArcGIS for Developers and various forums to answer this question, but haven't found anything. That doesn't necessarily mean it isn't out there somewhere, I just haven't found it. I anticipate a time when it would be nice to allow individuals to export data from a web app to shapefile, geodatabase, GeoJSON, or other formats. For instance, in both Portal and ArcGIS Online, I have an option to export a hosted feature layer to a variety of formats. Is there a widget (or even some sample code floating around out there) so that this functionality can be implemented within a JS API app? Thanks, Todd
... View more
05-14-2019
08:41 AM
|
0
|
5
|
5083
|
|
POST
|
As always, thank you for your prompt, insightful reply, Robert. I will look into this. In the meantime, I realized I may be over-complicating this. I am pursuing using a simple definitionExpression with each of the FeatureLayers rather than using a query task. It seems to do what I want/need, so this may be the route I take. Thanks again.
... View more
05-09-2019
02:01 PM
|
0
|
0
|
1017
|
|
POST
|
Brief overview: I am wanting to show both georeferenced species occurrences and county-level species occurrences because not all of our records are georeferenced. For this purpose, I have two feature layers, a 5km 2 hexagonal grid for the georeferenced locations and a county layer. Both have a column called sname for the species name. I have created a query task for both based on the same query. However, I cannot seem to get both of the results to show simultaneously. I have tried reordering, addMany for the graphics, and a bunch of other stuff, but nothing seems to work right. Any suggestions would be greatly appreciated. Code snippet: // Define sql expression eventually want to bind to record selected in OBIS explorer var query = new Query(); query.where = "sname = 'Nicrophorus americanus'" query.outFields = ["*"]; query.returnGeometry = true; // Define the query task for hexagons var hexquery = new QueryTask({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/OBIS_5km_Occurrences/MapServer/0/" }); // Define the query task for county polygons var coquery = new QueryTask({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/OBIS_County_Occurrences_Poly/MapServer/0/" }); // Execute the Hexagon Query hexquery.execute(query) .then(function(result){ result.features.forEach(function(item){ var hexgraphic = new Graphic({ geometry: item.geometry, attributes: item.attributes, symbol: { type: "simple-fill", color: [115, 178, 115], style: "solid", outline: null }, popupTemplate: { title: "<em>{sname}</em> ({vernacularname})", content: "ONHI has {count} occurrence record(s) for <em>{sname}</em> ({vernacularname}) in this hexagon" } }); view.graphics.add(hexgraphic); }); }) // Execute the County Query coquery.execute(query) .then(function(result){ result.features.forEach(function(item){ var cographic = new Graphic({ geometry: item.geometry, attributes: item.attributes, symbol: { type: "simple-fill", color: [240, 253, 230], style: "solid", outline: { // autocasts as new SimpleLineSymbol() color: "black", width: 0.5 } }, popupTemplate: { title: "<em>{sname}</em> ({vernacularname})", content: "ONHI has {count} occurrence record(s) for <em>{sname}</em> ({vernacularname}) in {county} County" } }); view.graphics.add(cographic); }); }) .otherwise(function(e){ console.log(e); }); Full code: <html> <head> <meta name="description" content="DevLav: Query a feature layer"> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> <title>County Level Species Occurrences</title> <style> html, body, #viewDiv { padding: 0; margin: 0; height: 100%; width: 100%; } .esri-view:fullscreen { background-color: #fff; } </style> <link rel="stylesheet" href="https://js.arcgis.com/4.11/esri/css/main.css"> <script src="https://js.arcgis.com/4.11/"></script> </head> <script> require([ "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/renderers/SimpleRenderer", "esri/geometry/Extent", "esri/geometry/SpatialReference", "esri/tasks/support/Query", "esri/tasks/QueryTask", "esri/Graphic", "esri/widgets/Fullscreen" ], function( Map, MapView, FeatureLayer, SimpleRenderer, Extent, SpatialReference, Query, QueryTask, Graphic, Fullscreen ) { //map extent: Need this since no basemap; otherwise extent is pretty wonky var bounds = new Extent({ "xmin":-103.5, "ymin":33.0, "xmax":-93.5, "ymax":37.5, "spatialReference":{"wkid":4326} //this is for the extent only; need to set map spatial reference in view. }); // Oklahoma Counties Layer var okcounties = new FeatureLayer({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/ArcGISServer_Counties/MapServer" }); var map = new Map({ //basemap: "satellite", layers: [okcounties] }); var view = new MapView({ container: "viewDiv", map: map, extent: bounds, spatialReference: 3857 //spatial reference of map; different from the extent }); // Define sql expression eventually want to bind to record selected in OBIS explorer var query = new Query(); query.where = "sname = 'Nicrophorus americanus'" query.outFields = ["*"]; query.returnGeometry = true; // Define the query task for hexagons var hexquery = new QueryTask({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/OBIS_5km_Occurrences/MapServer/0/" }); // Define the query task for county polygons var coquery = new QueryTask({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/OBIS_County_Occurrences_Poly/MapServer/0/" }); // Execute the Hexagon Query hexquery.execute(query) .then(function(result){ result.features.forEach(function(item){ var hexgraphic = new Graphic({ geometry: item.geometry, attributes: item.attributes, symbol: { type: "simple-fill", color: [115, 178, 115], style: "solid", outline: null }, popupTemplate: { title: "<em>{sname}</em> ({vernacularname})", content: "ONHI has {count} occurrence record(s) for <em>{sname}</em> ({vernacularname}) in this hexagon" } }); view.graphics.add(hexgraphic); }); }) // Execute the County Query coquery.execute(query) .then(function(result){ result.features.forEach(function(item){ var cographic = new Graphic({ geometry: item.geometry, attributes: item.attributes, symbol: { type: "simple-fill", color: [240, 253, 230], style: "solid", outline: { // autocasts as new SimpleLineSymbol() color: "black", width: 0.5 } }, popupTemplate: { title: "<em>{sname}</em> ({vernacularname})", content: "ONHI has {count} occurrence record(s) for <em>{sname}</em> ({vernacularname}) in {county} County" } }); view.graphics.add(cographic); }); }) .otherwise(function(e){ console.log(e); }); fullscreen = new Fullscreen({ view: view }); view.ui.add(fullscreen, "top-right"); view.when(disableZooming); /** * Disables all zoom gestures on the given view instance. * * @param {esri/views/MapView} view - The MapView instance on which to * disable zooming gestures. */ function disableZooming(view) { view.popup.dockEnabled = true; // Removes the zoom action on the popup view.popup.actions = []; // stops propagation of default behavior when an event fires function stopEvtPropagation(event) { event.stopPropagation(); } // exlude the zoom widget from the default UI view.ui.components = ["attribution"]; // disable mouse wheel scroll zooming on the view view.on("mouse-wheel", stopEvtPropagation); // disable zooming via double-click on the view view.on("double-click", stopEvtPropagation); // disable zooming out via double-click + Control on the view view.on("double-click", ["Control"], stopEvtPropagation); // disables pinch-zoom and panning on the view view.on("drag", stopEvtPropagation); // disable the view's zoom box to prevent the Shift + drag // and Shift + Control + drag zoom gestures. view.on("drag", ["Shift"], stopEvtPropagation); view.on("drag", ["Shift", "Control"], stopEvtPropagation); // prevents zooming with the + and - keys view.on("key-down", function(event) { var prohibitedKeys = ["+", "-", "Shift", "_", "="]; var keyPressed = event.key; if (prohibitedKeys.indexOf(keyPressed) !== -1) { event.stopPropagation(); } }); return view; } }); </script> </head> <body> <div id="viewDiv"></div> </body> </html>
... View more
05-09-2019
12:37 PM
|
0
|
2
|
1107
|
|
POST
|
Thank you for your reply. The only thing in the Media folder was the tile cache (single .tpk file--about 780 mb). I removed it and was able to successfully publish the survey. I then manually added the .tpk to the appropriate folder on the device. If there is something in the log file you specifically need for tracking these issues, I would be glad to publish a similar service with logging enable. However, since I have what I personally need at the moment, this isn't something I need to move forward. Thanks again. Todd
... View more
04-30-2019
01:17 PM
|
0
|
2
|
2204
|
|
POST
|
The screenshot below was taken about an hour of the one above. This is where it has been spinning and spinning.
... View more
04-29-2019
05:13 AM
|
0
|
4
|
2204
|
|
POST
|
I am trying to publish a survey with a .tpk basemap to our portal. For some reason, it continuously hangs on creating form item and never finishes publishing the survey. This is a copy of a survey I have published before (but had to delete), so I do not know what the problem is. There are currently no either items in the portal (all content has been cleared).
... View more
04-29-2019
04:15 AM
|
0
|
5
|
2344
|
|
POST
|
I knew it had to be something ridiculously easy. I, of course, didn't think to add something to the stylesheet. Thank you.
... View more
04-25-2019
06:16 PM
|
0
|
1
|
2703
|
|
POST
|
I have created a very simple map that displays species occurrences by county based on a query. The map has two feature layers, the species occurrences and a county outline. I am not using a basemap. I decided it might be nice to allow the users to view the map full screen. However, when I do this, the background turns black and, as a result, the county outlines (which are also black) are obscured. The simple solution is to add a renderer to the county feature layer to make the fill white (which I have done). However, I am still not really thrilled about the black background overall. Is there any fixes to this so the map has a white background as it does when not at full screen? Here's a live example: County Level Species Occurrences And the code: <html> <head> <meta name="description" content="DevLav: Query a feature layer"> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> <title>County Level Species Occurrences</title> <style> html, body, #viewDiv { padding: 0; margin: 0; height: 100%; width: 100%; } </style> <link rel="stylesheet" href="https://js.arcgis.com/4.11/esri/css/main.css"> <script src="https://js.arcgis.com/4.11/"></script> </head> <script> require([ "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/renderers/SimpleRenderer", "esri/geometry/Extent", "esri/geometry/SpatialReference", "esri/tasks/support/Query", "esri/tasks/QueryTask", "esri/Graphic", "esri/widgets/Fullscreen" ], function( Map, MapView, FeatureLayer, SimpleRenderer, Extent, SpatialReference, Query, QueryTask, Graphic, Fullscreen ) { //map extent: Need this since no basemap; otherwise extent is pretty wonky var bounds = new Extent({ "xmin":-103.5, "ymin":33.0, "xmax":-93.5, "ymax":37.5, "spatialReference":{"wkid":4326} //this is for the extent only; need to set map spatial reference in view. }); var countyRenderer = { type: "simple", // autocasts as new SimpleRenderer() symbol: { type: "simple-fill", // autocasts as new SimpleFillSymbol() color: "white", outline: { // autocasts as new SimpleLineSymbol() width: 1, color: "black" } } }; // Oklahoma Counties Layer var okcounties = new FeatureLayer({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/ArcGISServer_Counties/MapServer", renderer: countyRenderer }); var map = new Map({ //basemap: "satellite", layers: [okcounties] }); var view = new MapView({ container: "viewDiv", map: map, extent: bounds, spatialReference: 3857 //spatial reference of map; different from the extent }); // Define sql expression eventually want to bind to record selected in OBIS explorer var query = new Query(); query.where = "sname = 'Alnus maritima'" query.outFields = ["*"]; query.returnGeometry = true; // Define the query task var queryTask = new QueryTask({ url: "https://obsgis.csa.ou.edu:6443/arcgis/rest/services/ONHI/Taxa_Centroids/MapServer/0/" }); // Execute the query queryTask.execute(query) .then(function(result){ result.features.forEach(function(item){ var g = new Graphic({ geometry: item.geometry, attributes: item.attributes, symbol: { type: "simple-marker", size: 10, color: [55, 55, 55], outline: null }, popupTemplate: { title: "<em>{sname}</em> ({vernacularname})", content: "ONHI has {count} occurrence record(s) for <em>{sname}</em> ({vernacularname}) in {county} County" } }); view.graphics.add(g); }); }) .otherwise(function(e){ console.log(e); }); fullscreen = new Fullscreen({ view: view }); view.ui.add(fullscreen, "top-right"); view.when(disableZooming); /** * Disables all zoom gestures on the given view instance. * * @param {esri/views/MapView} view - The MapView instance on which to * disable zooming gestures. */ function disableZooming(view) { view.popup.dockEnabled = true; // Removes the zoom action on the popup view.popup.actions = []; // stops propagation of default behavior when an event fires function stopEvtPropagation(event) { event.stopPropagation(); } // exlude the zoom widget from the default UI view.ui.components = ["attribution"]; // disable mouse wheel scroll zooming on the view view.on("mouse-wheel", stopEvtPropagation); // disable zooming via double-click on the view view.on("double-click", stopEvtPropagation); // disable zooming out via double-click + Control on the view view.on("double-click", ["Control"], stopEvtPropagation); // disables pinch-zoom and panning on the view view.on("drag", stopEvtPropagation); // disable the view's zoom box to prevent the Shift + drag // and Shift + Control + drag zoom gestures. view.on("drag", ["Shift"], stopEvtPropagation); view.on("drag", ["Shift", "Control"], stopEvtPropagation); // prevents zooming with the + and - keys view.on("key-down", function(event) { var prohibitedKeys = ["+", "-", "Shift", "_", "="]; var keyPressed = event.key; if (prohibitedKeys.indexOf(keyPressed) !== -1) { event.stopPropagation(); } }); return view; } }); </script> </head> <body> <div id="viewDiv"></div> </body> </html>
... View more
04-25-2019
08:02 AM
|
0
|
3
|
2873
|
|
POST
|
Several years ago, I created a basic web app for a professor to use for one of his field classes. He recently tried to access it again, but it prompted him for a log-in. I double checked the sharing settings on the application, the web map, and the feature layers used and all are set to public. Does anyone have any ideas what is going on here?
... View more
04-19-2019
07:14 AM
|
0
|
0
|
604
|
|
POST
|
This may be a real stupid question, but I cannot seem to find the answer. I have added the Measurement in 2D widget to a map, but want to change the icons to something similar to the 3.x measurement icons. However, checking Esri Icon Font (Calcite theme) I am unable to find an icon that really illustrates measurement. I even tried to make my own, but they looked pretty crappy. Any suggestions? Thanks.
... View more
04-12-2019
10:44 AM
|
0
|
1
|
1461
|
|
POST
|
Greetings, I am fairly new to Collector and have what I assume is an issue others have long-ago addressed. If this question has been asked elsewhere, I apologize. I found nothing in my brief search. I have developed a Collector app with a related table for asset management. Each time an inspector goes to an asset, they add a new related record to the table. Easy enough. However, we need to ensure that the individual is really at the asset. As it is now, an individual can be anywhere, select an existing point, and add a related record. Is there a way to constrain this so that an individual has to be within, say, X distance of an asset to add a related record? Conversely, auto-populating X,Y fields would also serve as a "check." However, based on threads I have seen, this is tricky enough with a feature layer, let alone a related table. Any insight (even pointing to a different thread I accidentally overlooked) would be greatly appreciated. Thank you, Todd
... View more
03-12-2019
10:38 AM
|
0
|
0
|
616
|
|
POST
|
Once again, this is great. I made a small addition for anyone else who may stumble across this thread. For some reason (the best I can tell, at least) dgrid doesn't have a way to close the data grid once opened. The easy fix for me was to add a button with a tiny bit of JS to the gridDisplay div: <div id="gridDisplay"> <button class="button" onclick="document.getElementById('gridDisplay').style.display='none'" >x</button> <div id="grid"></div> </div> I don't know if this is the most elegant solution, but it works. Thanks again for your assistance.
... View more
02-22-2019
06:20 AM
|
1
|
0
|
1857
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-12-2025 12:15 PM | |
| 1 | 11-14-2024 12:18 PM | |
| 1 | 11-13-2024 01:18 PM | |
| 1 | 06-13-2024 03:06 PM | |
| 1 | 05-12-2022 06:53 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-13-2025
12:44 PM
|