POST
|
Hi Amit, Thanks for your reply. The Event Editor is version 10.7.1. A problem seems to be that although the editor item is registered on the portal and can be launched from the portal item by clicking the "View Application" button, there is no GUI edit button or any other option for adding a map to the application through the portal tools. When the application launches, the "Basemap" gallery dropdown is empty. Also, clicking the "Web Map" button on the left side of the ribbon does show existing folders that have been created on portal but it will not show any web maps that have been created within those folders. This may answer your question as to why we have used the method of adding local webmaps to the webmap.json file. Can you offer a suggestion as to why we do not seem to have a full connection to the portal interface with the application? In the config.json we have supplied the portalUrl and the portalAppId. By the way, our LRS service and LRS functionality works fine. We have our own LRS service as well as our own basemap service. However the local basemap service does not supply imagery, so we also include the esri world imagery service as a second basemap layer. Although the coordinate systems of the imagery service and our local services are different, they overlay with no problems. The only user issue is the annoying need to zoom into the state level from the whole world imagery view every time the app opens. Thanks, Elizabeth
... View more
04-05-2021
08:41 AM
|
0
|
0
|
1810
|
POST
|
I have configured RCE basemap layers in the sample webmap.json file. The layers include my local state-level custom basemap service and the esri World Imagery layer. Both load in the RCE map, but the view defaults to the world-wide extent of the esri imagery when the map opens. How can I configure the extent to zoom to my state-level view when the map first loads? I have attempted a few things in the map.js file but no luck so far. Also, I have tried configuring the map with the correct zoom level in Portal first, and then copying the json over to a new custom webmap.json file, but it does not retain the extent I set in the Portal map. Thanks very much for any suggestions.
... View more
04-01-2021
09:52 AM
|
0
|
3
|
1942
|
POST
|
I figured out the actionpane issue. I needed this format: var link = dojo.create("a", {
"id": "mylink",
"class": "action",
"innerHTML": Action Link", //text that appears in the popup for the link
"href": "javascript: void(0);"
}, dojo.query(".actionList", this.map.infoWindow.domNode)[0]) I'm still not sure if this will get me to the end result I want, but at least this link is now working. I would really like to build the link into the html as in the Multiple Query Results sample I cited above, but I have been unable to find examples of that in a dojo widget. Thank you so much for helping me think through this issue!
... View more
10-31-2019
07:13 AM
|
0
|
1
|
2843
|
POST
|
Thank you -- I corrected that to "inline" but that did not solve the problem. The Zoom to displays in any case, without adding special css. But still no other action displays. Like I said above, I can get the action to display if I use something like this example: customActions = this.map.infoWindow.addActions([ crimeAction ]);
... View more
10-30-2019
01:08 PM
|
0
|
3
|
2843
|
POST
|
No errors. I have dojo/query and dojo/dom-construct (query and domConstruct) in my define/declare code. Do I need to set up something in my css? I am not sure what .actionList and statsLink are referring to. I did try to experiment with the css but it didn't help. I created these entries: .esriPopup .actionsPane{ display: show; } .esriPopup .actionsPane .zoomTo{ display: show; } .esriPopup .actionsPane .action .mylink{ display: show;
... View more
10-30-2019
12:16 PM
|
0
|
5
|
2843
|
POST
|
Hi Robert, Yes it is…hovering over this.map.infoWindow.domNode in the devtools window shows it as “div.esriPopup.esriPopupVisible”. The “Zoom To” is showing up fine in the actions pane at the bottom of the infowindow as you can see in the attached screen shot of the elements.
... View more
10-30-2019
11:43 AM
|
0
|
7
|
2843
|
POST
|
I have been working with this sample (Call function from Popup window ) and I can't get it to work. I am working with a dojo widget for CMV. I have an infowindow that scrolls through a set of returns and it is working fine. I am trying to set up a link to a function that will highlight each feature shown in the infowindow when the user clicks (i.e. a link to a function that would be an href from the html -- this example Multiple Query Results | ArcGIS API for JavaScript 3.30 would do what I want, but I can't call the function from within the html.) So now I'm just trying to add the link to the actionpane of the infowindow and it is not showing up. I haven't even gotten to testing the function as I can't even get the visual link to show up. I can't see what is different from the example I refer to in the first sentence above. The only change I made was changing the reference to "window.map.infoWindow.domNode)[0])" to "this.map.infoWindow.domNode)[0])": var link = domConstruct.create("a", { "class": "action mylink", "id": "statsLink", "innerHTML": "Action Link Test", //text that appears in the popup for the link "href": "javascript: void(0);" }, query(".actionList", this.map.infoWindow.domNode)[0]); on(link, "click", this.myfunction()); I can get the link to show up if I use this sample from the Popup Documentation, but this format won't allow me to call my function. var customActions;
map.infoWindow.on("selection-change", function() {
var selectedFeature = map.infoWindow.getSelectedFeature();
if (selectedFeature && selectedFeature.attributes.TYPE === "crime") {
var crimeAction = {
title: "Crime Report",
className: "crime-report-action",
callback: function() {
console.log("Get Full Crime Report");
}
};
customActions = map.infoWindow.addActions([ crimeAction ]);
}
else {
map.infoWindow.removeActions(customActions);
}
}); Any help would be greatly appreciated! Thanks!
... View more
10-30-2019
10:27 AM
|
0
|
9
|
2994
|
IDEA
|
Great widget with many cool functions! My customer requests out-of-the-box sorting on the chosen layer and field when the user picks "Query a feature and zoom to it." Currently it works great when the user picks the map layer and attribute field, but the pick list for the field does not automatically sort, making it harder to find the feature the user is looking for. Something for the wish list... Thank you!
... View more
02-05-2019
09:08 AM
|
3
|
1
|
766
|
POST
|
Of course! I couldn't have solved this without your answer. Since I can't mark 2 answers, I have changed the mark.
... View more
12-03-2018
01:22 PM
|
0
|
0
|
1089
|
POST
|
Problem solved! Maybe it's not the best way, but this is now working perfectly for me. I kept both the code I originally had and added your suggestion to it. That did the trick. Hopefully it's not too ugly! mytogglefunction: function(){
//toggleButton
if (this.toggleButton.label == 'Start Tool'){
this.toggleButton.set('label', 'Stop Tool');
this.toggleButton.set('baseClass', 'success');
domClass.replace(this.toggleButton.domNode, 'success', 'danger');
this.map.setMapCursor('crosshair');
} else if (this.toggleButton.label == 'Stop Tool'){
this.toggleButton.set('baseClass', 'danger');
domClass.replace(this.toggleButton.domNode, 'danger', 'success');
this.toggleButton.set('label', 'Start Tool');
this.map.setMapCursor('default');
}
},
... View more
12-03-2018
12:19 PM
|
0
|
4
|
3308
|
POST
|
Thanks again -- something about my setup is still not working. I am not sure how the button id and the data-dojo-attach-point are being used and I think something is getting confused. Why is the data-dojo-attach-point for my button text (on line 7) showing up as "containerNode"? Also, in my example of the workaround I gave above, for example, the way it works is that it is changing the color of the background of the textbox, not the button itself. I don't understand this, since I thought the attach point and the id both refer to the button element I created. The workaround works because it changes the background color of the text immediately on click, whereas every attempt to change the css of the button still only works onmouseout. Using your code snippet in my setup results in a confusion of classes (but still with the onmouseout problem). I've tried to show more by copying some of the code from the Chrome elements panel. Here's what I see before clicking on the button: <span class="dijit dijitReset dijitInline danger" role="presentation" widgetid="mybutton">
<span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:__onClick" role="presentation">
<span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="mybutton_label" tabindex="0" id="mybutton" style="user-select: none;">
<span class="dijitReset dijitInline dijitIcon dijitNoIcon" data-dojo-attach-point="iconNode">
</span>
<span class="dijitReset dijitToggleButtonIconChar">●</span>
<span class="dijitReset dijitInline dijitButtonText" id="mybutton_label" data-dojo-attach-point="containerNode">Start Tool</span>
</span>
</span>
<input type="button" value="" class="dijitOffScreen" data-dojo-attach-event="onclick:_onClick" tabindex="-1" aria-hidden="true" data-dojo-attach-point="valueNode">
</span> After 1 click on the button -- there is no change except the text changes to "Stop Tool." Here's what I see after 2 clicks -- confusion of classes and the text changes back to "Start Tool." <span class="dijit dijitReset dijitInline success danger" role="presentation" widgetid="mybutton">
<span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:__onClick" role="presentation">
<span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="mybutton_label" tabindex="0" id="mybutton" style="user-select: none;">
<span class="dijitReset dijitInline dijitIcon dijitNoIcon" data-dojo-attach-point="iconNode">
</span>
<span class="dijitReset dijitToggleButtonIconChar">●</span>
<span class="dijitReset dijitInline dijitButtonText" id="mybutton_label" data-dojo-attach-point="containerNode">Start Tool</span>
</span>
</span>
<input type="button" value="" class="dijitOffScreen" data-dojo-attach-event="onclick:_onClick" tabindex="-1" aria-hidden="true" data-dojo-attach-point="valueNode">
</span>
... View more
12-03-2018
09:09 AM
|
0
|
6
|
3308
|
POST
|
That does not work for me unfortunately! I tried domClass.replace("mybutton", "success", "danger"); in my code but now the css class isn't changing at all (I tried changing the order of the 2 classes parameters in case I had it wrong!) Maybe I am setting up the button wrong in my html template? For what it's worth, here's what I have there. (I tried making the element a <button> rather than a <div> but it didn't seem to make a difference. Thanks again. <div data-dojo-attach-point="_contentPanel"> <div style="text-align:center"> <div style="padding:5px"> <div data-dojo-type="dijit/form/Button" id="mybutton" data-dojo-props="label:'Start Tool', baseClass:'danger'" data-dojo-attach-event="onClick:mytogglefunction" data-dojo-attach-point="toggleButton"> </div> </div> </div> </div>
... View more
11-30-2018
12:58 PM
|
0
|
8
|
3308
|
POST
|
I have resorted to a workaround. I didn't make any progress with getting the button to change color immediately on onClick using the css class. The class was updated only after the mouse was moved off the button. Then the color change would take effect. This problem was magnified on a phone, where the user would have to tap twice to get the button to change color. My workaround is I am changing the color directly in mytogglefunction. It changes the button immediately onclick and works on a phone too. I'm still interested in figuring out why the button onclick wouldn't immediately change my style, if you have any ideas. Here's my workaround: domStyle.set("mybutton", {
background: "#000000",
borderstyle: "solid",
borderwidth: "2px",
borderradius: "6px"
});
... View more
11-30-2018
11:33 AM
|
0
|
10
|
3308
|
POST
|
Robert, Here is the function. mytogglefunction: function () {
if (this.toggleButton.label == 'Start Tool'){
this.toggleButton.set('label', 'Stop Tool');
this.toggleButton.set('baseClass', 'success');
this.map.setMapCursor('crosshair');
this.createToolbar();
} else if (this.toggleButton.label == 'Stop Tool'){
this.toggleButton.set('baseClass', 'danger');
this.toggleButton.set('label', 'Start Tool');
this.map.setMapCursor('default');
this.defmapClickEvtHandler.remove();
this.map.graphics.clear();
this.map.infoWindow.hide();
this.map.removeLayer(allHwys);
this.gtoolbar.deactivate();
}
}, Here is one of the css styles: .success .dijitButtonNode {
background: #000000;
border-color: #000000;
color: #FFF;
padding: 6px 6px;
font-weight: bold;
border-style: solid;
border-width: 2px;
border-radius: 6px;
}
... View more
11-28-2018
02:05 PM
|
0
|
0
|
3308
|
Title | Kudos | Posted |
---|---|---|
3 | 02-05-2019 09:08 AM | |
1 | 11-22-2013 08:29 AM |
Online Status |
Offline
|
Date Last Visited |
05-14-2021
11:26 AM
|