POST
|
Hello. I have a portal setup here and an application where certain folks can edit a polygon dataset (add/edit/delete) that is stored on our databases and posted through server. In the same service there is another polygon dataset that is not editable but hosted on the same databases and posted in the same way. So my quest is this: 1. When the editable polygons are edited then there will be a model that runs automatically that calculates how many of the polygons of the non-editable dataset each specific polygon feature in the editable one intersect. 2. The number of intersecting polygons will be calculated and the result added to a specific integer attribute in the editable dataset. 3. Each of the polygons in the non-editable dataset has a name and those names will be added, for the respective intersected polygons, to an string attribute in the editable dataset. Is anyone a genius?
... View more
06-21-2019
12:04 AM
|
0
|
0
|
369
|
BLOG
|
Hey there y'all and thanks for a good thread. I have a pop-up with a bunch of hyperlinks and have gotten so far that they are hidden if they are empty (with the hyperlinking working fine), they however leave a blank lines in between where they are missing.. My pop-up code is something like this: <br /><a href="{RAMMEBETINGELSER}" target="_blank">{expression/expr6}</a> <br /><a href="{PHOTO_ALBUM}" target="_blank">{expression/expr7}</a> <br /><a href="{VANN_NETT}" target="_blank">{expression/expr8}</a> <br /><a href="{OTHER_DOCUMENT}" target="_blank">{expression/expr9}</a> Where each arcade-expression (and there is one specific one for each hyperlink) is: if (IsEmpty($feature.SAP)){ return "" } else { return "SAP" } if (IsEmpty($feature.SAP)){ return "" } else { return $feature.SAP } Anyone can be of help how i might solve this, to get rid of these blank spaces`in my pop-ups where there are empty hyperlinks?
... View more
10-22-2018
06:12 AM
|
0
|
0
|
31765
|
POST
|
Hello. Is it possible to save arcade expressions on AGOL so they can be picked (as default) and used again for various datasets, instead of needing to make them and saving them again for each and every dataset?
... View more
10-13-2018
11:26 AM
|
2
|
4
|
1603
|
POST
|
Excellent, works like a dream! Thanks so much for the quick assistance. One more thing as I have you on the line, in my searchWidget, do I have to reference the featureLayers being search as new FeatureLayer or can I somehow just reference their "id's" as they are also being added to the map itself?
... View more
11-30-2017
09:51 AM
|
0
|
0
|
3177
|
POST
|
Hey and thanks for the answers, have made the altercations but the problem still persists, could you take a look at my setup? <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Hlynur experiments</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
#layerToggle1 {
top: 13px;
right: 13px;
width: 165px;
position: absolute;
float: right;
color: #86888A;
text-align: left;
font-family: "arial";
font-size: 14px;
padding: 5px 2px;
background-color: white;
outline-color: white;
box-shadow: 1px 1px #bdbdbd;
}
#layerToggle2 {
top: 37px;
right: 13px;
width: 165px;
position: absolute;
float: right;
color: #86888A;
text-align: left;
font-family: "arial";
font-size: 14px;
padding: 5px 2px;
background-color: white;
outline-color: white;
box-shadow: 1px 1px #bdbdbd;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.5/esri/css/main.css">
<script src="https://js.arcgis.com/4.5/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/widgets/Home",
"esri/widgets/Zoom",
"esri/widgets/BasemapToggle",
"esri/tasks/Locator",
"esri/widgets/Search",
"esri/widgets/Expand",
"esri/layers/FeatureLayer",
"esri/core/watchUtils",
"dojo/dom",
"dojo/on",
"dojo/domReady!"
], function(
Map,
MapView,
Home,
Zoom,
BasemapToggle,
Locator,
Search,
Expand,
FeatureLayer,
watchUtils,
dom,
on,
) {
var map = new Map({
basemap: "gray",
});
var view = new MapView({
container: "viewDiv",
map: map,
zoom: 9,
extent: {
xmin: -3730050,
ymin: 6277314,
xmax: 4468890,
ymax: 12147678,
spatialReference: 102100
}
});
var homeWidget = new Home({
view: view
});
var basemapToggle = new BasemapToggle({
view: view,
nextBasemap: "satellite",
container: document.createElement("div")
});
var basemapToggleExpand = new Expand({
view: view,
content: basemapToggle.container,
expandIconClass: "esri-icon-basemap",
});
var searchWidget = new Search({
view:view,
allPlaceholder: "Incident or address",
container: document.createElement("div"),
sources: [
{
locator: new Locator({ url: "//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer" }),
singleLineFieldName: "SingleLine",
name: "Adress search",
localSearchOptions: {
minScale: 300000,
distance: 50000
},
maxResults: 3,
maxSuggestions: 6,
suggestionsEnabled: false,
minSuggestCharacters: 0,
resultGraphicEnabled: false
},{
featureLayer: new FeatureLayer({
url: "https://services1.arcgis.com/LpQVI6wAjYbHDKAK/arcgis/rest/services/Report_Service/FeatureServer/0",
popupTemplate: {
title: "{Incident_Type} </br> {Incident_Description}",
overwriteActions: true
}
}),
searchFields: ["Incident_Type"],
displayField: "Incident_Description",
exactMatch: false,
outFields: ["Incident_Type", "Report_Date"],
name: "Incident",
placeholder: "huh?",
zoomScale: 10000,
resultGraphicEnabled: false
}, {
featureLayer: new FeatureLayer({
url: "https://services1.arcgis.com/LpQVI6wAjYbHDKAK/arcgis/rest/services/Iceland_Test/FeatureServer/0",
popupTemplate: {
title: "{Name}",
overwriteActions: true
}
}),
searchFields: ["Name"],
suggestionTemplate: "{Name}",
exactMatch: false,
outFields: ["Name"],
name: "Basecamps",
zoomScale: 5000,
resultGraphicEnabled: false
}],
popupEnabled: false
});
var searchWidgetExpand = new Expand({
view: view,
content: searchWidget.container,
expandIconClass: "esri-icon-search",
});
var reportLyr = new FeatureLayer({
url: "https://services1.arcgis.com/LpQVI6wAjYbHDKAK/arcgis/rest/services/Report_Service/FeatureServer/0",
id: "report",
visible: false,
popupTemplate: {
title: "{Incident_Type}",
content: [{
type: "text",
text: "Here something seriously interresting has taken place, stay tuned for more AMAZING adventures!!!"
}]
},
outFields: ["*"]
});
var reportLyrToggle = dom.byId("reportLyr");
on(reportLyrToggle, "change", function() {
reportLyr.visible = reportLyrToggle.checked;
});
var icelandLyr = new FeatureLayer({
url: "https://services1.arcgis.com/LpQVI6wAjYbHDKAK/arcgis/rest/services/Iceland_Test/FeatureServer/0",
id: "iceland",
visible: false,
popupTemplate: {
title: "Basecamp",
content: [{
type: "text",
Text: "Place: {Name} <br/> Region: {Region}"
}, {
type: "media",
mediaInfos: [{
title: "{Name}",
type: "image",
value: {
sourceURL: "{PICTURE}"
}
}]
}, {
type: "attachments"
}],
actions: [{
id: "see-more",
className: "esri-icon-home",
title: "Visit homepage"
}]
},
outFields: ["*"]
});
var icelandLyrToggle = dom.byId("icelandLyr");
on(icelandLyrToggle, "change", function() {
icelandLyr.visible = icelandLyrToggle.checked;
});
expandhandle1 = watchUtils.pausable(basemapToggleExpand, "expanded", function(newValue, oldValue){
if(newValue === true){
expandHandle1.pause();
setTimeout(function(){
expandHandle2.resume();
}, 100);
}else{
expandHandle1.resume();
}
if(searchWidgetExpand.expanded){
searchWidgetExpand.collapse();
}
});
expandhandle2 = watchUtils.pausable(searchWidgetExpand, "expanded", function(newValue, oldValue){
if(newValue === true){
expandHandle2.pause();
setTimeout(function(){
expandHandle1.resume();
}, 100);
}else{
expandHandle2.resume();
}
if(basemapToggleExpand.expanded){
basemapToggleExpand.collapse();
}
});
view.on("layerview-create", function(event) {if (event.layer.id === "report") {console.log("LayerView for reports created!", event.layerView)};
});
view.on("layerview-create", function(event) {if (event.layer.id === "iceland") {console.log("Layerview for Iceland created!", event.layerView)}
});
map.add(reportLyr);
map.add(icelandLyr);
view.ui.add(homeWidget, {position: "top-left", index: 1});
view.ui.add(searchWidgetExpand, {position: "top-left", index: 3});
view.ui.add(basemapToggleExpand, {position: "top-left", index: 2});
view.then(function () {
var popup = view.popup;
popup.viewModel.on("trigger-action", function(event) {
if (event.action.id === "see-more") {
var attributes = popup.viewModel.selectedFeature.attributes;
var info = attributes.Link;
if (info !== null) {
window.open(info.trim());
} else {
window.open ("https://www.google.com/search?q=" +
attributes.Name);
}
}
});
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
<span id="layerToggle1">
<input type="checkbox" id="reportLyr">Hlynur has issues
</span>
<span id="layerToggle2">
<input type="checkbox" id="icelandLyr">Hlynur has basecamps
</span>
</body>
</html>
... View more
11-30-2017
09:30 AM
|
0
|
4
|
3177
|
POST
|
Hello. Making an app with widgets like search and basemapToggle in API 4x. All my widgets are being minimized by using the "Exapand" widget, my problem is that i need to close a widget before I open another one, otherwise both widgets stay open and overlap each other (as seen on attached png): So instead of this happening I would actually want one widget to close automatically when I open another one, in this case the search widget to automatically close when I open the basemapToggle one (and wise versa) Does anyone have some good solutions for me regarding this?
... View more
11-30-2017
05:51 AM
|
2
|
11
|
5133
|
POST
|
Hello. I am doing a simple 3D model with ArcScene that I then export as a 3D package that I upload to a portal. In my model I have 3D features such as points, polygons and polylines but also TIFF's that show a hillshade surface as well as orthophotos. Now my problem is that I cannot seem to export my TIFF's in the package as transparent (they are transparent in ArcScene and all is fine and dandy) but when the package has been uploaded to portal and openen with CityEngine Web viewer on Portal then the transparency is gone. I also have transparency on some of the 3D features (couple of lines and poly's) and that transfers fine between ArcScene and the Web viewer this way. Could anyone assist me in what I might be doing wrong, is it perhaps just not possible to have transparent TIFF's on Web viewer, and if so is there some kind of another file format I could use to make transparent surfaces in ArcScene that are posted as 3D package to CityEngine web viewer on Portal?
... View more
07-27-2017
06:18 AM
|
0
|
0
|
469
|
POST
|
Hello (yet again). So I am not being able to add media additions to the pop-up for Campus Place Locator. I would like to be able to both add images that are linked via URL in an attribute in the EmployeeInfo-table as well as using external URL's added straight to the code. Anyone can help me with how to make the additions to the following code to achieve this? personQueryLayerInfo: { url: 'https://services1.arcgis.com/LpQVI6wAjYbHDKAK/arcgis/rest/services/BuildingInterior/FeatureServer/4', layerNum: 4, addToMap: false, oidField: 'OBJECTID', relationshipId: 0, // this is a related table to the room layer relationshipField: 'LOCATION', //queryRelated is not working - so specify the relationship Field // it's important the fieldnames here are different from the fieldnames in the roomlayer's popup popupFields: [ {fieldName: 'KNOWNAS', label: 'Employee Name'}, {fieldName: 'EMAIL', label: 'Email', formatter: function(val) { return '<a href="mailto:' + val + '">' + val + '</a>'; } }, {fieldName: 'USERTYPE', label: 'Job Title'}, {fieldName: 'EXTENSION', label: 'Extension'}, {fieldName: 'COSTCTRN', label: 'Cost Center'}, {fieldName: 'LOCATION', label: 'Location'}, ], // the *first* one of these fields to be encountered will be used in the popup title popupTitleField: ['KNOWNAS'], popupTitlePriority: true, // popup will look for any fields above before it will look at the room layer queryFields: ['KNOWNAS', 'LOCATION'], queryLabelFields: ['KNOWNAS', 'LOCATION'], queryLabelFunction: function(attrs) { // 'this' = personQueryLayerInfo return attrs.KNOWNAS + ' (' + attrs.LOCATION + ')'; }, queryIconClass: 'fa fa-user' } -Hlynur.
... View more
06-14-2017
05:28 AM
|
0
|
0
|
820
|
POST
|
Hey Kelly and thanks for this. I went over it today before I did see this message and found out that there was some unfound error in the original MXD causing this, started with a fresh MXD and it worked fine
... View more
06-13-2017
12:19 PM
|
1
|
1
|
4185
|
POST
|
Hello. I have the same problem here, what was the solution you guys came down on?
... View more
06-12-2017
12:29 AM
|
0
|
3
|
4185
|
POST
|
Hey there Rebecca, I have no posted my Campus Place Locator problems in: https://community.esri.com/message/691069-campus-place-locator-on-portal
... View more
06-02-2017
06:13 AM
|
0
|
0
|
757
|
POST
|
Hello. Something seems to be off with my attempts to start using the Campus Place Locator, even when I go through the official guidelines from A to Z. So I was wondering if anyone else has had these growing pains. I am using a Portal setup and I have tried both hosting the tiled layers and featureservices on Portal and also to post them to server and take them from there to Portal, with them being all very visible and nice in a map on Portal itself (the 'create map' stage being completed). But when I go to configuring and posting then something is very off the code reveals nothing but the pan in/out buttons. Any idea what I might be doing wrong? -With regards, Hlynur.
... View more
06-02-2017
06:11 AM
|
0
|
17
|
3287
|
POST
|
Thanks for this Robert, am I understanding correctly that you can not use the search widget with mapImageLayers then?
... View more
05-03-2017
11:05 AM
|
0
|
1
|
572
|
POST
|
Hello. I am working with a mapservice that is built both on featureLayers and mapImageLayers and I would like the layerList tool for the service to only be applicable for the mapImageLayers, that is that only they are visible in the layerList tool and thus the only layers that can be turned on or off. To clarify a bit then I need to have mapImageLayers as I need the "tree function" for them, that is the main layers and sublayers under them to be on-and-off selectable. I however also need to have a search function (look within the dataset that is) and a pop-up function so thus I use the featureLayers, though they are built on the same dataset as the mapImageLayers, so I just add them to the service and set opacity to '0'. Problem with this is that now both the mapImageLayers and the featureLayers appear in the layerList widget. So maybe there is a better way to do this, where one can rely only on mapImageLayers or featureLayers for the following functionality: layerList with a tree of sublayers. Search function. Nice Pop-Ups. If so then it would be nice to get any comments on that instead/also.
... View more
05-02-2017
01:17 PM
|
0
|
3
|
916
|
Title | Kudos | Posted |
---|---|---|
1 | 06-13-2017 12:19 PM | |
2 | 10-13-2018 11:26 AM | |
2 | 11-30-2017 05:51 AM |
Online Status |
Offline
|
Date Last Visited |
12-11-2020
05:50 AM
|