POST
|
I just had time to look at this some more and I realized that the attributes are showing up in the info Div but the layer still isn't highlighting. Can you please help with that?
... View more
04-03-2024
11:28 AM
|
0
|
0
|
524
|
POST
|
Yes, that's what I mean by pop-up. It should display 2 attribute values and highlight the feature. Right now it does neither.
... View more
04-03-2024
09:04 AM
|
0
|
0
|
548
|
POST
|
I turned off the media layer and now I get zero warnings or errors in the console. But I still don't get any popups either.
... View more
04-03-2024
08:39 AM
|
0
|
0
|
558
|
POST
|
I don't know JavaScript well so I thought I was inputting a string, not a variable with "NAME." I've changed that to "areaName" as well but I still don't get features to show on my map. The message in the console is: "[esri.views.2d.layers.MediaLayerView2D]" // [object Object] { "name": "element-load-error", "message": "Element cannot be displayed", "details": "[object]" }
... View more
04-03-2024
07:13 AM
|
0
|
0
|
573
|
POST
|
Hi, I'm trying to modify the Access features with pointer events sample code from the ArcGIS Developers site. I want it to work with an existing webmap and with a polygon layer instead of a line. I've run the code through ChapGPT, which had me make some changes from the original structure, but the code isn't working either way. (Feature layer url and portal item id have been removed from the code below, but both do load in codepen.) Any help would be much appreciated. <html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Access features with pointer events | RH Planning Areas</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
#info {
background-color: black;
opacity: 0.75;
color: lightBlue;
font-size: 18pt;
padding: 8px;
visibility: hidden;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.29/esri/themes/light/main.css" />
<script src="https://js.arcgis.com/4.29/"></script>
<script>
require(["esri/WebMap", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/symbols/SimpleFillSymbol"],
(WebMap, MapView, FeatureLayer, SimpleFillSymbol) => {
const PlanningAreasLayer = new FeatureLayer({
url: "https://.../FeatureServer/0",
outFields: ["*"]
});
const webmap = new WebMap({
portalItem: {
id: "itemID",
portal: "https://www.arcgis.com",
layers: [PlanningAreasLayer]
}
});
const view = new MapView({
container: "viewDiv",
map: webmap,
center: [-83.1563078,42.6645259],
zoom: 12,
highlightOptions: {
color: "lightBlue"
}
});
view.ui.add("info", "top-right");
view
.when()
.then(() => {
return PlanningAreasLayer.when();
})
.then((layer) => {
const renderer = layer.renderer.clone();
const fillSymbol = {
type: "simple-fill",
color: [255, 0, 255, 0], //transparent fill
outline: {
color: [255, 0, 0, 0], //red
width: 4
}
};
renderer.symbol = fillSymbol;
layer.renderer = renderer;
// Set up an event handler for pointer-down (mobile)
// and pointer-move events (mouse)
// and retrieve the screen x, y coordinates
return view.whenLayerView(layer);
})
.then((layerView) => {
view.on("pointer-move", eventHandler);
view.on("pointer-down", eventHandler);
function eventHandler(event) {
// only include graphics from PlanningAreasLayer in the hitTest
const opts = {
include: PlanningAreasLayer
}
// the hitTest() checks to see if any graphics from the PlanningAreasLayer
// intersect the x, y coordinates of the pointer
view.hitTest(event, opts).then(getGraphics);
}
let highlight, currentName;
function getGraphics(response) {
// the topmost graphic from the PlanningAreasLayer
// and display select attribute values from the
// graphic to the user
if (response.results.length) {
const graphic = response.results[0].graphic;
const attributes = graphic.attributes;
const areaName = attributes.Neighbor_1;
const mapLink = attributes.Neighborho
const id = attributes.OBJECTID;
if (highlight && currentName !== areaName) {
//Check if a highlight exists (is not null or undefined)
//Checks if the current name is not equal to the name
//If true, name has changed so highlight should be removed
//If condition is true, execute the following code
highlight.remove(); //Remove the highlight from the graphic
highlight = null; //Set the highlight variable to null
return; //Exit the current function
}
if (highlight) {
const query = layerView.createQuery();
query.where = "NAME = '" + areaName + "'";
layerView.queryObjectIds(query).then((ids) => {
if (highlight) {
highlight.remove()
}
highlight = layerView.highlight(ids);
currentName = areaName;
})
}
//diplay information about the feature
document.getElementById("info").style.visibility = "visible";
document.getElementById("name").innerHTML = areaName;
document.getElementById("link").innerHTML = mapLink;
} else {
// remove the highlight if no features are
// returned from the hitTest
if (highlight){
highlight.remove();
highlight = null;
}
document.getElementById("info").style.visibility = "hidden";
}
}
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
<div id="info">
<span id="name"></span> <br />
<span id="link"></span>
</div>
</body>
</html>
... View more
04-02-2024
01:53 PM
|
0
|
10
|
811
|
IDEA
|
It would be great if the default font actually worked. I have mine set to Arial and every new layout element I add defaults to Tahoma. It has always been this way. I have had a default font set since that option was rolled out and it has never worked. It is this way in every single one of my projects.
... View more
09-28-2023
01:55 PM
|
0
|
0
|
750
|
POST
|
BarryKeight, I had to open a support case for this issue and we found that when using the Share Web Tool geoprocessing tool it would not allow me to select both Export Web Map and Get Layout Templates Info from my History. It was only grabbing Export Web Map and I had to manually add Get Layout Templates Info to the tool before publishing. It looks like Esri has updated their documentation to include this step. Once we republished the print service, the URL worked in Experience Builder.
... View more
09-25-2023
08:44 AM
|
1
|
0
|
2136
|
IDEA
|
It's currently extremely difficult to search the Living Atlas for stylx files. Most of the style files available are those authored by John Nelson, and those are super awesome styles by a creative cartographer, but sometimes I just want to add Esri's standard transportation or civic style to a project and I have to download that stylx file from the style gallery in order to access it. My request has two parts: 1. Please make all styles available in the Living Atlas. 2. Make it easier to filter for styles by adding Style as a Type in the filter widget.
... View more
09-08-2023
12:12 PM
|
5
|
2
|
458
|
IDEA
|
I just got off a call with Esri support. I'm using pgAdmin, so that's the solution I can offer. If you highlight the database, then click Tools > Query Tool, you can run the following statement, assuming your sde user has already been created: GRANT azure_pg_admin TO sde; This solution comes from Microsoft documentation here. Sde still won't have superuser permissions but should be able to disconnect users from the database, which is what we really need.
... View more
05-03-2023
09:04 AM
|
0
|
0
|
2254
|
IDEA
|
I also don't understand why Esri documentation says that Microsoft Azure Database for PostgreSQL (Flexible Server) is supported since it doesn't allow superuser permissions. My understanding is that superuser status is required to drop end user connections to the db for maintenance purposes. Are there extensions that can be enabled that would grant these permissions without requiring superuser status?
... View more
04-28-2023
09:00 AM
|
0
|
0
|
2272
|
POST
|
Is it possible to populate an attribute field with time data taken from a tracking layer? Specifically, can you populate a hydrant flush time field by measuring the time spent standing next to the hydrant?
... View more
02-14-2023
10:35 AM
|
0
|
1
|
599
|
POST
|
I'm also experiencing this problem. I just updated from 2.9.x to 3.0.2 and that's when it started for me.
... View more
10-03-2022
03:22 PM
|
1
|
0
|
6720
|
POST
|
The Bug report linked above says this was fixed in version 2.6 but I'm still having this issue in 2.9. Esri, please fix this!
... View more
09-06-2022
10:47 AM
|
0
|
2
|
2825
|
POST
|
I'm also having this same problem. Making the hub group publicly visible did not work for me. Current Group settings: [Group] Content - Viewable by everyone (public); Membership for my organization only [Group] Core Team - Viewable by all organization members; Membership for my organization only Hub site: https://planning-dept-giffels-webster.hub.arcgis.com/ The apps underlined in red in the attached image are located on other AGO sites and are shared publicly but do not open from my hub. They all display the following error: "Page Not Found. This page may have been moved or deleted. Try searching for it from the homepage."
... View more
06-27-2022
10:23 AM
|
0
|
0
|
1902
|
IDEA
|
It would be really helpful to be able to choose how my text is aligned in the new Story Maps. Right now, all content block text is automatically aligned to the left, with no option to center text or align it to the right. I know that centering is an option for Quote blocks, but that changes the formatting of my text to match the title text, not paragraph text, so it looks out of place. This is not a good enough work around.
... View more
08-05-2021
07:01 AM
|
14
|
4
|
1891
|
Title | Kudos | Posted |
---|---|---|
1 | 07-24-2019 05:58 AM | |
1 | 09-25-2023 08:44 AM | |
5 | 09-08-2023 12:12 PM | |
1 | 10-03-2022 03:22 PM | |
14 | 08-05-2021 07:01 AM |