|
POST
|
Hi @ToddFagin , Would it be possible for you to post your working code? I have a similar situation.
... View more
10-23-2023
06:53 PM
|
0
|
1
|
4967
|
|
POST
|
Is there something similar to the District Lookup Widget you can use with the JavaScript SDK? I'd like to search an address and display the features of a hosted feature layer. Using the Search widget with multiple sources example , it allows me to search by features of a feature layer, however this requires the user to know what to look for. I'm looking enter an address to get the feature and its attributes--something similar to the District Lookup Widget. This is what I currently have using the search widget. <html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Access Will County</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.27/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.27/"></script>
<script>
require(["esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/widgets/Search"], (
Map,
MapView,
FeatureLayer,
Search
) => {
const map = new Map({
basemap: "dark-gray-vector"
});
const view = new MapView({
container: "viewDiv",
map: map,
center: [-88, 41.5], // lon, lat
scale: 1000000
});
const featureLayerService = new FeatureLayer({
url:
"https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/DialARide_Service_Areas/FeatureServer",
popupTemplate: {
// autocasts as new PopupTemplate()
title: "Service Area: {Service}",
overwriteActions: true
}
});
const searchWidget = new Search({
view: view,
// allPlaceholder: "Search",
searchAllEnabled: false,
includeDefaultSources: false,
sources: [
{
name: "Search by address",
placeholder: "search by address",
apiKey: "Your API Key Here",
singleLineFieldName: "SingleLine",
url: "https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer"
},
{
layer: featureLayerService,
searchFields: ["Service"],
displayField: "Service",
exactMatch: false,
outFields: ["Service"],
name: "Search by Service Area",
placeholder: "example: Will Ride"
}
]
});
// Add the search widget to the top left corner of the view
view.ui.add(searchWidget, {
position: "top-right"
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
10-19-2023
07:21 AM
|
0
|
3
|
1593
|
|
POST
|
After creating a case, we found out it was not in the javascript. Rather, one (or all) of the layers in the webmap was causing the warning as it was rendering. I had a hand full of ArcGIS server web services (orthos and lidar) in the webmap. After creating a new webmap and adding those layers with the exact same properties, styles and effects the warning was no longer there. If anything, it's a work-around.
... View more
10-05-2023
12:42 PM
|
0
|
0
|
2210
|
|
POST
|
After looking closer the renderingRule has been depreciated. https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#renderingRule
... View more
10-04-2023
09:13 AM
|
0
|
1
|
2229
|
|
POST
|
I updated my app to v. 4.27 from 4.24 and now I'm getting this warning. I changed the property from ImageryLayer to rasterFunction, however that caused the imagery not to draw. Any help appreciated. EDIT: The app I'm working with uses webmaps. In the webmaps are map services. Here is the script: <script>
require(["esri/Map",
"esri/views/MapView",
"esri/widgets/Search",
"esri/widgets/Locate",
"esri/widgets/LayerList",
"esri/layers/ImageryLayer",
"esri/widgets/Legend",
"esri/widgets/Expand",
"esri/widgets/Swipe",
"esri/WebMap",
"esri/layers/support/RasterFunction",
], (Map, MapView, Search, Locate, LayerList, ImageryLayer, Legend, Expand, Swipe, WebMap, RasterFunction) => {
//webmap IDs
const webmapids = [
"e67a8eb6768641c19d4a7c5df394dbf4", //DTM
"bfc5b0242adb42bfb0fc41e54497dfc8", //DSM
"6ed3d2e495db4e859a73d2a32ce3d576", //HEDEM
"d653b18bc941458491e06e657e10f393", //Intensity
"a9ab25b1c7204764b2fabad6fc7a4635", //IR
"e6bab92ebc524072a3305ec8f128e8f8", //Soil
"2f9acebfb8db4e10bb6dddab8d3239c7", //ClosedDepressions
];
const webmaps = webmapids.map((webmapid) => {
return new WebMap({
portalItem: {
// autocasts as new PortalItem()
id: webmapid,
}
});
});
console.log("map constructor created")
// add image services used in the swipe map
const imagery2021 = new ImageryLayer({
url: "https://gis.willcountyillinois.com/image/rest/services/Orthoimagery/Orthos_2021_6IN/ImageServer",
rasterFunction: [],
// title: "2021 Orthoimagery 6in",
});
// webmaps[0].add(imagery2021);
/************************************************************
* Initialize the View with the first WebMap
************************************************************/
const view = new MapView({
map: webmaps[0],
container: "viewDiv"
});
//use promise function.when to add the imagery layer after the webmap group layer, hence, rendering it over the group layers
view.when(function () {
webmaps[0].add(imagery2021);
});
// create a new Swipe widget
const swipe = new Swipe({
leadingLayers: [imagery2021],
// trailingLayers: [imagery2021],
position: 35, // set position of widget to 35%
dragLabel: "drag left or right",
view: view
});
// add the widget to the view
view.ui.add(swipe);
/************************************************************
* On a button click, change the map of the View
************************************************************/
document.querySelector(".btns").addEventListener("click", (event) => {
const id = event.target.getAttribute("data-id");
if (id) {
const webmap = webmaps[id];
view.map = webmap;
webmap.when(function () { webmap.add(imagery2021); });
const nodes = document.querySelectorAll(".btn-switch");
for (let idx = 0; idx < nodes.length; idx++) {
const node = nodes[idx];
const mapIndex = node.getAttribute("data-id");
if (mapIndex === id) {
node.classList.add("active-map");
} else {
node.classList.remove("active-map");
}
}
}
});
// group widgets on right so expand does not cover other widgets on that side
let expand1 = new Expand({
expandTooltip: "info",
view: view,
content: document.getElementById("infoDiv"),
expandIconClass: "esri-icon-question",
group: "top-right"
});
let expand2 = new Expand({
expandTooltip: "legend",
view: view,
content: new Legend({
view: view,
style: "classic", // other styles include 'classic'
}),
expanded: false,
group: "top-right"
});
let expand3 = new Expand({
expandTooltip: "layer list",
view: view,
content: new LayerList({
view: view,
}),
group: "top-right",
});
view.ui.add([expand1, expand2, expand3], "top-right");
//add search widget
const searchWidget = new Search({
view: view,
});
const searchWidgetExpand = new Expand({
content: searchWidget,
expanded: false,
})
//add search widget to the view
view.ui.add(searchWidgetExpand, {
position: "top-left"
});
//locate widget
const locateBtn = new Locate({
view: view
});
//add locate widget to the view
view.ui.add(locateBtn, {
position: "top-left"
});
});
</script>
... View more
10-04-2023
08:12 AM
|
0
|
2
|
2258
|
|
POST
|
Is the search widget not included? I've put "search" and "Search" in the ui.compenents and they cause an error. ui.components = [
"attribution",
"zoom",
"search"
];
... View more
09-26-2023
09:26 AM
|
0
|
1
|
2330
|
|
POST
|
This works to remove it completely with v. 4.27. const view = new MapView({
container: "viewDiv",
map: map,
// Exclude the zoom widget from the default UI
ui: {
components: ["attribution"]
}
}); The sample code doesn't mention how to disable the zoom widget on mobile device only. Is that possible? It's not so practical and takes up too much room.
... View more
09-26-2023
07:09 AM
|
0
|
3
|
2355
|
|
POST
|
The app I'm working on is basically a conglomeration of some of the samples. It works fine as is. In it, if you click on a point in the map you will see the text from the feature's Description field update in the sidebar. I want the same thing to happen when you click an option in the "Search by Category" drop-down. Working app is here I've been working in the section of code that puts the pop-up result in the sidebar. I can't find a reproducible sample for what I want to do. //Popup in sidebar
view.when().then(function () {
// Create a default graphic for when the application starts
const graphic = {
popupTemplate: {
content: "To search by item make sure Search by Category is set to 'Select one'.<br> <br>Businesses should note that they will find more appropriate listings if they check Business under the search box. Hit Search after changing from Residential to Business or vice versa."
},
};
// Provide a graphic to a new instance of a Feature widget
const feature = new Feature({
container: "sidebar",
graphic: graphic,
map: view.map,
spatialReference: view.spatialReference
});
// description variable
var sidebardescription = {
//autocasts the new template
content: [
{
//set a descriptive text element
type: "text", // TextContentElement
text: "{Description}"
},
]
};
view.whenLayerView(recycleLayer).then(function (layerView) {
let highlight;
// listen for the pointer-move event on the View
view.on("click", function (event) {
// Perform a hitTest on the View
view.hitTest(event).then(function (event) {
// Make sure graphic has a popupTemplate
let results = event.results.filter(function (result) {
return result.graphic.layer.popupTemplate;
});
let result = results[0];
highlight && highlight.remove();
// On pointer-click, update the graphic of the Feature widget
// with the result
if (result) {
feature.graphic = result.graphic.clone(); //clone it to avoid mutation
feature.graphic.popupTemplate = sidebardescription;
highlight = layerView.highlight(result.graphic);
} else {
feature.graphic = graphic;
}
});
console.info("popup chosen")
});
});
});
... View more
09-19-2023
01:46 PM
|
0
|
0
|
877
|
|
POST
|
Philip, Try going to the Survey123 webpage under Collaborate and check the box for Who can submit to this survey? Sometimes that box gets reset when you make changes to survey.
... View more
07-06-2023
07:08 AM
|
1
|
0
|
9729
|
|
POST
|
I still don't know what's directly causing the error. But, I was also able to use the tool directly from the Conversion Tools toolbox. And as far as copy/paste goes it didn't seem to be an option?
... View more
04-13-2023
09:14 AM
|
0
|
0
|
3869
|
|
POST
|
Thanks for the links. On the Github page it directs you to the Pricing tab of ArcGIS Developer. There it sounds as if both geocoding services are treated as one and the same?
... View more
04-06-2023
08:38 AM
|
1
|
1
|
2186
|
|
POST
|
Does it act like ESRI world geocoding service and use credits when it is used in a Leaflet map?. I've just begun experimenting with ESRI Leaflet: https://developers.arcgis.com/esri-leaflet/geocode-and-search/search-for-an-address/
... View more
04-05-2023
02:32 PM
|
0
|
3
|
2226
|
|
POST
|
Hello @IsmaelChivite and @ZacharySutherby , I can edit existing points through the survey in the field app just fine thanks to that video. I don't see any issues regarding the bug either. However, this seems to only be available for the field app. Is there also a way to do the same thing in the web version of Survey123? EDIT: After actually looking into it, I found you can do this through the URL thanks to this blog: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-editing-records-in-a/ba-p/895827
... View more
03-03-2023
10:51 AM
|
0
|
0
|
3293
|
|
POST
|
Two weeks later and I still can't export street annotation to fgdb. A couple things I didn't mention are that I tried exporting both in layout and a map. And the layer shows up in the fgdb, but there is no annotation when I add it to the map. In the Properties menu the Anntation Version is ArcGIS Pro 2.x. I wonder if this has anything to do with the error.
... View more
01-24-2023
11:06 AM
|
0
|
0
|
4012
|
|
POST
|
I'm attempting to export street annotation to the project default.gdb. I have done this in the past with no hang-ups. I'm not sure what has changed, besides maybe updating to Pro 3.0. The error page doesn't reveal much. All it said is check the log files, but I'm only aware of looking at the messages in the History pane under the Analysis tab. I'm wondering if anyone else has seen this? I'm able to use the export features menu on another layer stored in the same *.sde with no problems. Workflow: right click layer in Contents pane --> Data --> Export Features EDIT: I've also created a new *.gdb in the same project folder and attempted to export the anno to it, but received the same error.
... View more
01-11-2023
07:44 AM
|
0
|
4
|
4109
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-25-2026 12:25 PM | |
| 1 | 05-04-2026 08:45 AM | |
| 1 | 04-20-2026 01:20 PM | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|