|
POST
|
I remember seeing the option to view a features attachments (images) right in the popup content in a dashboard template.... I don't see this capability in any of the other templates... Using Portal 10.5 and I don't have dashboard installed that apparently runs via a windows application??? wow Anyone know if you can view the attachments (images) in a popup/identify in any of the templates? WITHOUT having to have it open a new browser window (a pain). I would like to select a feature and have the images display int he popup and cycle through them in the popup
... View more
01-17-2019
10:59 AM
|
0
|
0
|
627
|
|
POST
|
I can modify the background color where the blue arrow is point in the configuration inside portal. As you can see this area is a bit darker in the image. But I cannot seem to find the location of the background where the red arrow is pointing Anyone have any thoughts? Again this is in portal 10.5.1
... View more
01-16-2019
05:53 AM
|
0
|
0
|
643
|
|
POST
|
I cant seem to get to this background color....how do I change it.
... View more
01-15-2019
11:55 AM
|
0
|
1
|
737
|
|
POST
|
That would work also....but I think they way I posted it might be another way?????? Where I eliminate the duplicating legendDijit code in the LayerList.js file
... View more
12-05-2018
06:48 AM
|
0
|
0
|
1847
|
|
POST
|
I removed all the legend code from the LayerList.js page Reset the variable of the Feature Layer using "window." now its global window.WMAFL = new FeatureLayer("https://xx/arcgis/rest/services/Projects/xx/MapServer/4", { Then just relying on the index.js page to work as normal NOTING that I had to define the layer variable in the index.js page that resides in the LayerList.js page WMAFL is the Feature Layer variable from LayerList.js map.addLayers([SafetyBridges, WMAFL ]); index.js var SafetyBridges = new FeatureLayer("https://fragis.fra.dot.gov/fragis/rest/services/SafetyBridges/MapServer/0", {
mode: FeatureLayer.MODE_ONDEMAND
});
// Push to Layer List
legendLayers6.push({ layer: SafetyBridges, title: 'Safety Bridges' });
//ADD THE LEGEND
window.map.on("layers-add-result", function (evt) {
// CYCLE through and grab all the layer names to add to the LEGEND PLUS
// Remove layers not inteneted for the legend.
var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {
if (layer.layer.id === "PastLocations" || layer.layer.id === "District" ||
layer.layer.id === "weatherlayer") { return { }; } //Hides Layers in the Legend
else { return { layer: layer.layer, title: layer.layer.name }; } //Else return
});
if (layerInfo.length > 0) {
var legendDijit = new Legend({
map: map,
layerInfos: layerInfo,
}, "legend");
legendDijit.startup();
legendDijit.refresh();
}
});
map.addLayers([SafetyBridges, WMAFL ]);
LayerList.js // WMA LINE
window.WMAFL = new FeatureLayer("https://xx/arcgis/rest/services/Projects/xx/MapServer/4", {
mode: FeatureLayer.MODE_SNAPSHOT
});
legendLayers4.push({ layer: WMAFL, title: 'WMA Line' });
... View more
12-05-2018
06:45 AM
|
0
|
0
|
1847
|
|
POST
|
I was able to get this working....will post shortly.
... View more
12-05-2018
06:36 AM
|
0
|
1
|
1847
|
|
POST
|
I have a main index.js page This page defines some Map Services and builds a legend. This works fine. I have a couple other .js pages that also display Map Services and I am trying to get them in the same Legend unsuccessfully. I don't think I have to create a new LEGEND in the LayerList.js page but rather just push the layers from the LayerListPage back to the Index.js page to be included in the already defined LEGEND? Looking for some thoughts on this....not sure where to go from here... Notice the unction call to the second .js page window.LoadLayerList(); in the index.js page Hope this make sense.... Main Index.js page //ADD THE LEGEND
window.map.on("layers-add-result", function (evt) {
// CYCLE through and grab all the layer names to add to the LEGEND PLUS
// Remove layers not inteneted for the legend.
var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {
if (layer.layer.id === "Roads" || layer.layer.id === "Roads1") { return { }; }
//Hides Layers in the Legend
else { return { layer: layer.layer, title: layer.layer.name }; } //Else return All others
});
// CYCLE through and grab all the layer names to add to the LEGEND
if (layerInfo.length > 0) {
var legendDijit = new Legend({
map: map,
layerInfos: layerInfo,
}, "legend");
legendDijit.startup();
legendDijit.refresh();
}
});
window.LoadLayerList(); LayerList.js page window.LoadLayerList = function(){
var District2 = new FeatureLayer("https://vafwisdev.dgif.virginia.gov/arcgis/rest/services/Projects/AVL2/MapServer/4", {
mode: FeatureLayer.MODE_SNAPSHOT,
id: "District2",
opacity: .2,
visible: true
});
legendLayers4.push({ layer: District2, title: 'District Boundary' });
window.map.on("layers-add-result", function (evt) {
var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {
if (layer.layer.id === "Biologist" || layer.layer.id === "District2") { return { }; } //Hides Layers in the Legend
else { return { layer: layer.layer, title: layer.layer.name }; } //Else return All others
});
if (layerInfo.length > 0) {
var legendDijit = new Legend({
map: map,
layerInfos: layerInfo,
}, "legend");
legendDijit.startup();
legendDijit.refresh();
}
});
// ADD MAP LAYERS
}
... View more
12-05-2018
05:54 AM
|
0
|
4
|
1949
|
|
POST
|
see that its a toggle...seems to be working for turning on and off...just not seeing where it defaults to turn everything on the first time.
... View more
12-04-2018
10:53 AM
|
0
|
1
|
2986
|
|
POST
|
Would it be the below to uncheck them? Used to using a False or True statement cb.set("checked" , !cb.unchecked)
... View more
12-04-2018
10:49 AM
|
0
|
3
|
2986
|
|
POST
|
Is there a faster way to loop through the checkboxes and just turn them all on instead of using a switch to check each one individually?
... View more
12-04-2018
08:47 AM
|
0
|
0
|
2986
|
|
POST
|
I can test to determine if the checkbox is checked but for some reason I CANNOT get it to check it if its not checked This is what I see in the ELEMENTS of the page <div class="dijit dijitReset dijitInline dijitCheckBox" role="presentation" widgetid="dijit_form_CheckBox_19"><input name="checkBoxFisheriesBiologist" type="checkbox" role="checkbox" aria-checked="false" class="dijitReset dijitCheckBoxInput" data-dojo-attach-point="focusNode" data-dojo-attach-event="ondijitclick:_onClick" tabindex="0" id="dijit_form_CheckBox_19" value="FisheriesBiologist" style="user-select: none;"></div> trying a couple different ways to check it....but not working. it alerts "not checked" but does not check the box with any of the below calls: document.getElementsByName("FisheriesBiologist").checked = true; document.getElementsByName("checkBoxFisheriesBiologist").checked = true; document.getElementById("dijit_form_CheckBox_19").checked = true; document.getElementById("DGIFFeaturesButton").onclick = function () {
arrayUtils.forEach(legendLayers4, function (layer) {
var layerName = layer.title;
//alert (layerName);
var layerID = layer.layer.id;
//alert(layerID);
var test = layerID;
switch (test){
case "FisheriesBiologist":
alert("Fisheries Biologist");
if (dijit_form_CheckBox_19.checked == true){
alert("checked");
} else {
document.getElementsByName("checkBoxFisheriesBiologist").checked == true;
document.getElementById("dijit_form_CheckBox_19").checked = true;
alert(" not checked");
}
break;
// SNIP
... View more
12-04-2018
08:23 AM
|
0
|
7
|
2986
|
|
POST
|
I have an accordion style section that contains content panes with layers inside them for the user to turn on and off As seen below there are 5 content panes I am building a layer list that has checkboxes built on the fly with JavaScript. I am using this on each FeatureLayer to determine which one it goes into: legendLayers4.push({ layer: RailYards, title: 'Rail Yards' }); I added a button to the each of their content panes to be used to check all boxes or uncheck all boxes What I am trying to do now is turn on all layers in that specific content pane by clicking the BUTTON or turning them all off by clicking the same BUTTON I can handle all the little stuff but just cant see to get control of them in Javascript.... How do I test each checkbox...I can return their Layer title and Layer ID etc but can seem to be able to get the actual checkbox reference to test if it is checked or not...If I can get that far I can handle the button etc I am trying to get to the individual checkboxes in document.getElementById("FeaturesButton").onclick = function () { You can see below that I am looping trough the legendLayers4 and creating a checkbox and label for each checkbox to be created. <div id="IDAccordionPaneLayers" data-dojo-type="dijit.layout.AccordionContainer" style="color:black; height:50%; width:90%;">
<!-- SNIP -->
<div id="idLayers4" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title:'Features'" selected="true" >
<button type="button" id="FeaturesButton" style="float: right;" >Click Me!</button>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="title:'Natural Disasters'">
<div id="toggle4" style="padding: 2px 2px; color:Black;"></div>
</div>
</div>
<!-- SNIP -->
</div> // ON EACH LAYER I SPECIFY WHICH LEGEND LAYER I WANT IT TO GO TO
legendLayers4.push({ layer: RailYards, title: 'Rail Yards' });
arrayUtils.forEach(legendLayers4, function (layer) {
var layerName = layer.title;
var checkBox = new CheckBox({
name: "checkBox" + layer.layer.id,
value: layer.layer.id,
checked: layer.layer.visible
});
checkBox.on("change", function () {
var targetLayer = map.getLayer(this.value);
targetLayer.setVisibility(!targetLayer.visible);
this.checked = targetLayer.visible;
});
//add the check box and label to the toc
domConstruct.place(checkBox.domNode, dom.byId("toggle4"), "after");
var checkLabel = domConstruct.create('label', {
'for': checkBox.name,
innerHTML: layerName
}, checkBox.domNode, "after");
domConstruct.place("<br />", checkLabel, "after");
});
document.getElementById("FeaturesButton").onclick = function () {
arrayUtils.forEach(legendLayers4, function (layer) {
var layerName = layer.title;
//alert (layerName);
var layerID = layer.layer.id;
//alert(layerID);
var i;
for (i = 0; i < layerID.length; i++) {
//myNodelist.style.backgroundColor = "red";
alert(layerID);
}
});
};
... View more
12-04-2018
07:16 AM
|
0
|
8
|
3099
|
|
POST
|
Thats it....yes the image refreshed automatically.....GREAT....thanks for your help so very appreciated.
... View more
12-03-2018
01:15 PM
|
0
|
0
|
1582
|
|
POST
|
Think I got it... function onLayerUpdateEnd(){ missing the { on the Function Testin now
... View more
12-03-2018
01:14 PM
|
0
|
1
|
1582
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|