|
POST
|
view.graphics.removeAll() doesn't remove it from the map view. When I console.log view.graphics.length, there are no graphics even before I try to remove any graphics. I'm at a loss as to why this graphic is appearing and how to remove it.
... View more
07-27-2020
10:13 AM
|
0
|
10
|
3312
|
|
POST
|
The strange thing is that when I revert back to ArcGIS API for JS v 4.11, the cyan feature isn't added. As soon as I move to 4.12 or more recent, it's added and I can't get it to go away. Is there something I can do with the resultGraphic parameter or do you have any examples of using the resultGrahic in the Search tool? At this point, I'm willing to just style it in a way that it is hidden from view. The documentation for Search says this about the resultGraphic, but I can't find any examples online of how to set this up: The graphic used to highlight the resulting feature or location. A graphic will be placed in the View's graphics for layer views that do not support the highlight method.
... View more
07-27-2020
09:00 AM
|
0
|
12
|
3312
|
|
POST
|
Thanks Robert. I'm not sure if I understood your response. I set the popupEnabled option to 'false', but I'm still seeing the cyan symbology when the Search widget finishes. Is there another option I need to set?
... View more
07-27-2020
07:49 AM
|
0
|
14
|
3312
|
|
POST
|
I'm using the Search widget to allow users to search for parcel addresses. The Search process is working properly except it places a blue graphic on the map even though I'm specifying that I don't want a graphic. I'm assigning my own symbology to the selected feature (the orange border in the below image), and I don't want the additional blue graphic that is being forced on the selected feature. Here is my code for the search process: //Create search tool to search addresses
const searchTool = new Search({
view: myView,
sources: [
{
layer: parcelLyr,
searchFields: ["propstreet"],
displayField: "propstreet",
name: "LayerSearchSource",
placeholder: "example: 500 Griswold",
suggestionsEnabled: true,
//autoNavigate: true,
resultGraphicEnabled: false
}
],
container: addressSearchBar,
includeDefaultSources: false,
resultGraphicEnabled: false
})
searchTool.on("select-result", function(event){
console.log("location was chosen ", event)
long = event.result.feature.geometry.centroid.longitude + 0.003
lat = event.result.feature.geometry.centroid.latitude
myView.center = [long, lat];
myView.zoom = 16
console.log("geometry: ", event.result.feature.geometry)
selectedParcel = event.result.feature
createHighlightedParcel();
}) I create my own symbology in the createHighlightedParcel() function at the end. My understanding is that setting resultGraphicEnabled to false should remove the result graphic. Am I wrong about this? Is there another way to prevent the result graphic? Thank you
... View more
07-27-2020
06:58 AM
|
0
|
18
|
5785
|
|
POST
|
Great! Thank you Egge-Jan. I don't need to stick with v4.11. I've now upgraded to 4.16 and it is working as it should. Thanks for the assistance! Paul
... View more
07-25-2020
05:45 PM
|
1
|
0
|
3433
|
|
POST
|
Hello, I'm creating a map application using the ArcGIS API for JS v4.11. I'm running into an issue where I can't zoom closer than zoom level 16. I've applied constraints to my MapView, which I've called myView: //Constrain the max and min zoom levels
myView.constraints = {
minZoom: 13,
maxZoom: 19
}; The minZoom is being honered... I can't zoom out further than zoom level 13, but I can't zoom in to 19. I don't know if it makes a difference, but I'm using a custom basemap that I created using the Vector Tile Style Editor: ArcGIS Vector Tile Style Editor Is there any additional configuration I need to do if using a custom basemap? Here's how I bring in the custom basemap: //Create the main map, starting with a custom basemap
var basemap = new Basemap({
baseLayers: [
new VectorTileLayer({
portalItem: {
id: "ddef64bb74174dd6adf7cff46dd24da7"
}
})
],
title: "customBM",
id: "customBM"
}); Thanks, Paul
... View more
07-24-2020
12:59 PM
|
0
|
3
|
3534
|
|
POST
|
I'd like to create an Annotation Label that "selectively" adds street names as I zoom in. I've created a map image layer that consists of cached tiles. I've created several annotation layers that I publish with the map image layer. When I look at the map service on a web map, it looks like my initial effort mostly worked. However, I'm now trying to fine tune things and I'm trying to avoid every street name appearing on the web map. For example, below is a screen capture of the web map at a particular zoom level (forgive the difficulty reading the road labels; I haven't fine tuned things). You can see that every street feature is labeled. This is kind of cluttered, and it'd be even more cluttered if I were zoomed to other places on the map. Is there a way to specify that, for instance, I only want all of the streets labeled when I'm zoomed all of the way in on the map. Otherwise, I'd like for the streets to be "selectively" labeled? Can I somehow control this when I'm using the "Tiled Labels to Annotation" tool?
... View more
03-03-2020
11:51 AM
|
0
|
0
|
493
|
|
POST
|
Thank you Tanu. You were correct, my printing service did not have access to the map services that I was adding to the map. I embedded the credentials into the print service, and this took care of the issue. This documentation was very helpful for embedding the credentials: Print maps that contain secured services—Documentation (10.7) | ArcGIS Enterprise . Thanks again for your help! Paul
... View more
01-28-2020
12:51 PM
|
0
|
0
|
3495
|
|
POST
|
I've created a print service with a custom print template. I'm relatively new to this, so the solution might be obvious but I can't seem to figure it out. I've added the print service URL to the web application I'm putting together using Web AppBuilder: The print template that I've created was made in ArcMap and looks like the following: I had no issues publishing this as a printing service to Server. When I use the Print widget with no layers on the map (just the basemap), I'm able to successfully run my custom printing service: However, the problem arises when I add a layer to the map. In the below image, I've added a layer using the Add Data widget: But when I try to Print using my custom template, I get the error: Error, try again. When I hover over the exclamation point, the message I get is esriJobFailed: Is there something that I missed when setting up the Printing Service itself? Any documentation to get me going in the right direction would be appreciated. Thanks
... View more
01-27-2020
01:02 PM
|
0
|
3
|
3808
|
|
POST
|
Can someone tell me if I'd be able to add the content of a feature layer hosted on AGO to a Power BI dashboard and create tiles that are populated with the content from the feature layer. I've been able to add my AGO content to a map in Power BI, but I haven't been able to interact with that content in a tile. Is this functionality that simply doesn't exist or is it that I don't have the proper subscription? Thank you.
... View more
12-09-2019
12:44 PM
|
1
|
1
|
904
|
|
POST
|
Thanks Jake, this was much simpler than I thought! I simply changed the settings as suggested from your second link.
... View more
10-16-2019
06:48 AM
|
0
|
0
|
791
|
|
POST
|
I'd like to set up Collector for ArcGIS so that each person conducting the survey automatically has their name recorded as the surveyor. We'd like to use this as a way to make sure that some of our surveyors are not filling in for others if someone shirks their responsibilities. In our case we have five surveyors. If surveyor A conducts a survey, then I would like the Collector form to automatically record surveyor A (or some sort of unique identifier) as the person doing the work. I initially thought that setting up Feature Layer Views might be the solution, but according to this document I'm unable to change Value Lists in Feature Layer Views: Create hosted feature layer views—ArcGIS Online Help | Documentation Is there some other workflow where I would be able to somehow set each of the surveyors up so that their names are automatically recorded when they conduct a survey? Would configuring ownership of multiple Feature Layers (one for each surveyor) somehow solve this? Thanks
... View more
10-16-2019
05:31 AM
|
0
|
2
|
826
|
|
POST
|
I'd like to query content according to a spatial relationship using ArcGIS API 4.12. I've set up a test of this query as follows: var municBoundariesURL = "https://devarcgisent.placeholdertext.lan/serverdev/rest/services/ParkFinder/MunicipalBoundaries2/MapServer/0"
var queryOptions = new Query({
//where: "1=1",
outFields: ["*"],
returnGeometry: true,
spatialRelationship: "within",
geometry: "-83.04517899999858,42.32973669999929"
});
var queryTask = new QueryTask({
url: municBoundariesURL
});
queryTask.execute(queryOptions).then(function(response){
var nameResults = response.features.map(function(feature){
feature.name = feature.attributes.NAME
return feature;
});
}); I know this isn't set up correctly, but I played with a number of configurations and every time I got a message in the console saying: "[esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of 'esri.geometry.Extent', 'esri.geometry.Multipoint', 'esri.geometry.Point', 'esri.geometry.Polyline', 'esri.geometry.Polygon', or a plain object that can autocast (having .type = 'extent', 'multipoint', 'point', 'polyline', 'polygon')" The heart of my question boils down to lines 2-7 above. I can successfully search by field name (ie, set 'where' equal to "1=1" or any other field name), so I know the query is working when the query options are populated properly. Can someone help me to set up the query options so that I can return just the feature that the point (specified with 'geometry') falls within? Thank you
... View more
10-04-2019
07:38 AM
|
0
|
2
|
1493
|
|
POST
|
Thanks for your response Jonathan. The map is displaying a Map Image Layer with three Feature Layers. The Map Image Layer and the Web Map that it's loaded to are shared with Everyone (public). The data were published to our ArcGIS Server from Pro by referencing data in a registered folder (in other words, when I publish from Pro, I'm pointing to a registered location). However, I set up our Distributed Collaboration so that Feature Layers would be sent by reference and not copied. Is this the reason why I'm getting the error? I can change it so that Feature Layers will be copied, but my understanding is that this would then consume service credits since a copy of the data would be placed on AGO rather than on our own internal servers. Is that true?
... View more
09-23-2019
10:45 AM
|
0
|
0
|
3918
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-10-2019 10:59 AM | |
| 1 | 07-30-2020 10:55 AM | |
| 1 | 10-13-2020 07:35 AM | |
| 1 | 10-08-2020 10:18 AM | |
| 1 | 09-23-2019 05:34 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|