I have two questions for you. First I am trying to change my Zoom Scale in the layer search. It doesn't matter what I put in that scale box always zooms into the same scale. Is there something I'm missing.
The second question is, what does it base the search results order off? I'm having it search by name and some names could produce 100 search results.
Thanks for the clarification on the ZoomScale. Allowing a user to set a zoom scale not only to a point but to polygon would be a great addition to tool, if possible. With me I am searching extremely small parcels, that it zooms so far in, that the searcher can't even see the streets at that scale.
For the Result Item Sorting, I just realized I'm a version behind, so I will be updating to your current version to take advantage of that option.
Keep up the awesome work. Your search widgets have always been great to work with.
Apologies if this has been raised previously, and this may not be the correct forum, but I seem to have lost the ability to alter the column aliases of search results in the attribute table. I haven't changed my version of eSearch (1.2.0.3) and it previously worked but unfortunately I can't pinpoint what may have changed. Add as operational layer and show in attribute table widget are both selected.
I have downloaded your newest version and I'm still having an issue with the sorting. I looked and my service is set to Support Advanced Queries. Attached is screenshots off all my settings and results. As you can see that I have it sorted by last name and than first name. And the first name is all over the place on the results pane; it goes Glenn, Carie, Emmer. Not much of sorting.
Wow, can't believe no one has reported this till now. It is a one line fix in the code. If you want to fix your app then open the Widget.js file from the eSearch folder and find:
Apologize if this has been discussed...went through all of the comments and did not see it mentioned. I have a map service published from fgdb feature classes each having multiple attribute indices. When I add any of those layers to the eSearch widget and launch, it fails on those layers every time with the error message "Search Layer Map Service Failure" along with a note that the layer will be removed from the widget. It also seems to break other search layers. If I remove the layers in question from the confiig, the eSearch widget works well again. Wondering if anyone else has experienced this and if there is a potential solution? I have a workaround in place but it is less than ideal.
I'm using WAB v1.2 and eSearch widget 1.2.0.5 (tested at 1.2.0.6 with same result) along with the Local Layer widget. The web console error notes that the services failed with a link to widget.js line 775. Appreciate any help you can offer. Thanks!
Part of my workaround was making a copy of the fgdb's, removing all but 1 index from the feature classes and publishing a new service. The resulting services work fine when added to the widget. But from your comment, it sounds like it may have something to do with the indices themselves. Thanks!
If you can do a query using the rest end point page for that layer and it successfully returns results with geometry then your layer should work fine in eSearch. So I would suggest that you test your Map Service layers rest end point page.
Thanks, Robert. I am able to query the rest endpoint and it successfully returns results with geometry. I'm going to try re-publishing the service and see if that does anything.
Your Enhanced Search Widget 1.2.0.6 is a rock solid release!
You have introduced so many useful enhancements.
I like the Scroll bar you have added to that helps while entering a long list of Predefined values like for example the Section Numbers that go from 1 through 36.
Now I have the option to define my own custom symbols for every layer, if I choose to do so. This is a great enhancement. The Flex version allowed this.
I like how it intelligently allows you to edit only the Polygon symbol, for a Polygon layer. The Point and Line options do not show up.
Here is the Township Range layer using the Default Polygon Symbology.
However, the Sections can be drawn using my Layer Specific Symbology.
I also like the Clear button that you added to the By Value pane.
Now we can sum the values of one numeric field in a given layer.
I can now set all my Field Aliases within your eSearch Configuration.
Both the Pop-up and Attribute Table show my Field Alias.
This is an awesome enhancement.
I like how the Attribute Table only shows the Fields that I have included in the Configuration page.
The remaining fields are not displayed in the Attribute Table.
This is another wonderful enhancement.
The end user will see a much cleaner and tailored display.
I like the fix from Sebastian.
The dark and light alternating bands maintain their integrity.
This makes it easy to see the boundary where the listing of one record ends and the next one begins. In addition, the currently selected record is shown in a slightly darker shade of gray.
Robert, everything is working flawlessly on all themes.
The colors of the controls match the Style Color.
Can we make these two buttons match the Style Color?
Then again, there may be a good reason to leave it the way it is.
With the enhancements you have put into version 1.2.0.6, to integrate this with the Attribute Table, it almost mimics all the functionality of the Data Grid in your Flex version.
You had a convenient Show Results in a Grid button in the Flex version.
With one mouse click you could display the Attributes in a Data Grid.
On the Web AppBuilder version, you have to first open the Layer List Widget like so:
Then one has to click on the down arrow on the Search Results Layer and click Open Attribute Table.
Would it be a lot of coding to add a tiny Attribute Table button right on the Results Pane like so?
It could have a tool tip like "Show attribute table".
Then just like your Flex version, the user can open the Attribute Table with a single mouse click.
If you could add this enhancement, it would greatly streamline the workflow.
Thanks a million for all the wonderful goodies you keep creating every week. You have made it so simple and efficient to create these powerful web applications in a matter of minutes!
First, let's zoom to our study area to view a Point data layer (Sirens)
Open the Enhanced Bookmark Widget and select Palo Verde
The Sirens are symbolized with big red screaming dots.
Minimize the Enhanced Bookmark Widget.
Open the Enhanced Search Widget 1.2.0.6
The default search is By Value
The default search layer = PV Sirens
The default Siren Number = 10
Accept the defaults and press Search
The eSearch Results panel shows Siren Number 10
The map zooms to Siren Number 10.
Use the Zoom Previous Tool to go back to the Previous Extent.
Keep the eSearch Widget open.
Open the Identify 1.2.0.3 Widget
Set the Identify Layer to PV Sirens
Engage the Extent Tool to Identify 2 Sirens.
The Identify Results panel now shows 2 Sirens.
The eSearch Results panel still retains the original selection.
So far, so good.
Keep the Identify Widget open.
Open the By Shape tab on the eSearch Widget.
Activate the Extent Tool and Search for a single Siren.
Notice, how eSearch returns the correct result.
However, this also refreshes the Identify results panel to mirror the eSearch results.
Go back to the Previous Extent.
Open the Identify Tab.
Use the Extent Tool to Identify two Sirens
Notice, how Identify now refreshes the eSearch results panel to mirror the Identify results.
With so many graphic layers active, I know how complex it is to code the selection logic with the possibility of having multiple widgets open and multiple selection tools active that the user may be engaging.
I have a field “Feedback_URL”, after eSearch widget is running and the results are added to the attribute table, the link looks like below:
Currently it displays all the url text like "http:///www.XXX.feedbackXXXX". I want to display the field as text like “Click here to provide feedback”, and I want keep this text to be hyperlink. When users clicks on it, it goes to the url contained inside the “Feedback_URL” field. Is this possible? Thanks!
I wish ESRI would lift there game on this. Your eSearch widget would integrate with the Attribute widget beautifully if ESRI provided more config functionality.
They really need to provide more functionality on all there Widgets.
Robert Scheitlin, GISP, how can I create a Search URL that routes through my Internal proxy?
I have a couple web maps I put together that are for internal ONLY clients. Those maps work great, you helped me on the proxy setup. Now, there is talk of combining some of the functionality into a single map. SO this means that I would have a BLANK operational layer map, and I would need to Enhanced Search using a Search URL from my proxy'd layers.
Not sure I follow. The eSearch does not care about internal external when talking about the url search. All it cares about is the search parameters like esearch and slayer in the url.
Ok now I understand better what you are wanting to do. You will not be able to configure the layer if the machine WAB dev is running on does not have access to that url.
The URL I am trying to reach is for a REST Service that I have made private. The URL to access that feature is password protected. I have a proxy setup that allows two other web maps to access that REST service via an AGOL Web Map I build that is shared internally only. Those web maps work just fine. I developed them on the same machine I am using now.
I can go to AGOL, use the internal REST Service URL, create a webmap, go to WAB, create a Web App, export, upload to external/internal server, configure to use the proxy and everything works...
But the Enhanced Search won't accept the REST Service URL because I don't think it's going through the proxy?
Does the logo: false pair have to be included in the config for the showAttribution: false pair to behave? Because I'm still getting the map attribution display. Not an issue in my api
No the "showAttribution": false can function by itself. Make sure that you have it in the mapOptions object and not accidentally added inside another object like the extent object or something.
Good catch TAPAS. I was placing the showAttribution option after my lods array with no effect. Once I moved the option immediately below the extent option no issues:
Thanks for the info in the Identify and eSearch being linked when using the drawing tools and a theme that allows multiple widgets to be active at the same time. The next release of both the eSearch and Identify will have code in place to prevent this.
How do you add a custom widget to Web App Builder? I looked at the help, and it started by stating to hover over the new widget, but how does it get there? I downloaded the zip file, but what now?
';
}
}
}
catch(e){
}
}
}
if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) {
if (trLabelsHtml != "") {
var labelSname = "";
if(labelEle[i].querySelector("ul li:nth-child(1)").getAttribute("aria-hidden")){
labelSname = labelEle[i].querySelector("ul li:nth-child(1)").outerHTML;
}
labelEle[i].innerHTML = "";
labelEle[i].innerHTML = labelSname + trLabelsHtml;
}
}
}
}
}
catch(e){
}
}
}
/* V 2.0:3 = Store not translated reply id */
if(lingoRSXML.snapshotLength == 0){
if($scope.falseReplyID == "") {
$scope.falseReplyID = value;
}
}
/* Get translated Body of Replies/Comments */
var lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for(var i=0;i 0) {
var attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('div.custom-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else if(rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('#attachments').length > 0){
if ("TkbArticlePage" == "BlogArticlePage") {
attachDiv = rootElement.querySelector('div.lia-quilt-row-main .lia-message-body-content').querySelector('#attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
}
else{
attachDiv = "";
}
}else{
attachDiv = rootElement.querySelector('div.lia-quilt-row-main').querySelector('#attachments').outerHTML;
}
}
else {
attachDiv = "";
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-quilt-row-main').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var k = 0; k < feedbackDivs.length; k++) {
feedbackDiv = feedbackDiv + feedbackDivs[k].outerHTML;
}
}
}
else {
var attachDiv = rootElement.querySelector('div.lia-message-body-content').querySelector('div.Attachments.preview-attachments');
if (attachDiv) {
attachDiv = attachDiv.outerHTML;
} else {
attachDiv = "";
}
/* Everyone tags links */
if (document.querySelectorAll("div.TagList").length > 0){
var everyoneTagslink = document.querySelector('div.lia-quilt-row-main').querySelector(".MessageTagsTaplet .TagList");
if ((everyoneTagslink != null)||(everyoneTagslink != undefined)){
everyoneTagslink = everyoneTagslink.outerHTML;
}
else{
everyoneTagslink = "";
}
}
/* Feedback Div */
var feedbackDiv = "";
var feedbackDivs = rootElement.querySelector('div.lia-message-body-content').querySelectorAll('div.lia-panel-feedback-banner-safe');
if (feedbackDivs.length > 0) {
for (var m = 0; m < feedbackDivs.length; m++) {
feedbackDiv = feedbackDiv + feedbackDivs[m].outerHTML;
}
}
}
}
} catch (e) {
}
if (body_L == "") {
/* V 2.0:7 Replacing translated video data with source video data */
var newBodyVideoData = newBody.querySelectorAll('div[class*="video-embed"]');
angular.forEach($scope.videoData[value], function (sourceVideoElement, index) {
if (index <= (newBodyVideoData.length - 1)) {
newBodyVideoData[index].outerHTML = sourceVideoElement.outerHTML
}
});
/* V 2.0:7 = Replacing translated image data with source data */
var newBodyImageData = newBody.querySelectorAll('[class*="lia-image"]');
angular.forEach($scope.imageData[value], function (sourceImgElement, index) {
if (index <= (newBodyImageData.length - 1)) {
newBodyImageData[index].outerHTML = sourceImgElement.outerHTML;
}
});
/* V 2.0:7 = Replacing translated pre tag data with source data */
var newBodyPreTagData = newBody.querySelectorAll('pre');
angular.forEach($scope.preTagData[value], function (sourcePreTagElement, index) {
if (index <= (newBodyPreTagData.length - 1)) {
newBodyPreTagData[index].outerHTML = sourcePreTagElement.outerHTML;
}
});
}
var copyBodySubject = false;
if (body_L == "") {
copyBodySubject = true;
body_L = newBody.innerHTML;
}
/* This code is written as part of video fix by iTalent */
/* try{
var iframeHTMLText = body_L;
var searchIframeText = "<IFRAME";
var foundiFrameTag;
if (iframeHTMLText.indexOf(searchIframeText) > -1) {
foundiFrameTag = decodeHTMLEntities(iframeHTMLText);
foundiFrameTag = foundiFrameTag.split('src="')[1];
body_L = foundiFrameTag;
}
}
catch(e){
} */
/* This code is placed to remove the extra meta tag adding in the UI*/
try{
body_L = body_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />','');
}
catch(e){
}
/** We should not replace the source content if user profile language and selected target language matches with source language **/
if(showTrContent) {
var compiled = false;
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = null
if("TkbArticlePage"=="IdeaPage"){
// var customAttachDiv = '';
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
compiled = true;
/* Attach atttach div */
// document.querySelector("div.translation-attachments-"+value).innerHTML = attachDiv;
rootElement.querySelectorAll('div.lia-message-body-content')[0].insertAdjacentHTML('afterend',attachDiv);
if(rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message').length > 1){
rootElement.querySelectorAll('div.lia-quilt-idea-message .lia-message-body .lia-attachments-message')[1].remove();
}
} else {
if("TkbArticlePage"=="TkbArticlePage"){
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv ;
}else{
rootElement.querySelectorAll('div.lia-message-body-content')[0].innerHTML = body_L + feedbackDiv + attachDiv;
compiled = true;
}
}
/* Destroy and recreate OOyala player videos to restore the videos in target languages which is written by iTalent as part of iTrack LILICON-79 */ /* Destroy and recreate OOyala player videos */
try{
// $scope.videoData[value][0].querySelector("div").getAttribute("id");
for(var vidIndex=0; vidIndex<$scope.videoData[value].length; vidIndex++){
if( $scope.videoData[value][vidIndex].querySelector("div") != null){
var containerId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].containerId;
videoId = LITHIUM.OOYALA.players[$scope.videoData[value][vidIndex].querySelector("div").getAttribute("id")].videoId;
/** Get the Video object */
vid = OO.Player.create(containerId,videoId);
/** Destroy the video **/
vid.destroy();
/** recreate in the same position */
var vid = OO.Player.create(containerId,videoId);
}
}
}
catch(e){
}
try{
for(var vidIndex=0; vidIndex<($scope.videoData[value].length); vidIndex++){
if($scope.videoData[value][vidIndex].querySelector('video-js') != null){
var data_id = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-video-id');
var data_account = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-account');
var data_palyer = $scope.videoData[value][vidIndex].querySelector('video-js').getAttribute('data-player');
var div = document.createElement('div');
div.id = "brightcove";
div.class = "brightcove-player";
div.innerHTML =
'(view in my videos)'
var data = div.getElementsByClassName("video-js");
var script = document.createElement('script');
script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js";
for(var i=0;i< data.length;i++){
videodata.push(data[i]);
}
}
}
for(var i=0;i< videodata.length;i++){
document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML;
document.body.appendChild(script);
}
}
catch(e){
}
if(!compiled){
/* Re compile html */
$compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope);
}
}
if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) {
/* Adding Translation flag */
var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) {
return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase()
});
if (tr_obj.length > 0) {
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.".replace(/lilicon-trans-text/g, tr_obj[0].title);
try {
if ($scope.wootMessages[$rootScope.profLang] != undefined) {
tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title);
}
} catch (e) {
}
} else {
//tr_text = "This message was translated for your convenience!";
tr_text = "Esri may utilize third parties to translate your data and/or imagery to facilitate communication across different languages.";
}
try {
if (!document.getElementById("tr-msz-" + value)) {
var tr_para = document.createElement("P");
tr_para.setAttribute("id", "tr-msz-" + value);
tr_para.setAttribute("class", "tr-msz");
tr_para.style.textAlign = 'justify';
var tr_fTag = document.createElement("IMG");
tr_fTag.setAttribute("class", "tFlag");
tr_fTag.setAttribute("src", "/html/assets/langTrFlag.PNG");
tr_fTag.style.marginRight = "5px";
tr_fTag.style.height = "14px";
tr_para.appendChild(tr_fTag);
var tr_textNode = document.createTextNode(tr_text);
tr_para.appendChild(tr_textNode);
/* Woot message only for multi source */
if(rootElement.querySelector(".lia-quilt-forum-message")){
rootElement.querySelector(".lia-quilt-forum-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) {
rootElement.querySelector(".lia-message-view-blog-topic-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){
rootElement.querySelector(".lia-quilt-blog-reply-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-message")){
rootElement.querySelector(".lia-quilt-tkb-message").appendChild(tr_para);
} else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){
rootElement.querySelector(".lia-quilt-tkb-reply-message").insertBefore(tr_para,rootElement.querySelector(".lia-quilt-row.lia-quilt-row-footer"));
} else if(rootElement.querySelector(".lia-quilt-idea-message")){
rootElement.querySelector(".lia-quilt-idea-message").appendChild(tr_para);
} else if(rootElement.querySelector('.lia-quilt-occasion-message')){
rootElement.querySelector('.lia-quilt-occasion-message').appendChild(tr_para);
}
else {
if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) {
rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para);
} else {
rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para);
}
}
}
} catch (e) {
}
}
} else {
/* Do not display button for same language */
// syncList.remove(value);
var index = $scope.syncList.indexOf(value);
if (index > -1) {
$scope.syncList.splice(index, 1);
}
}
}
}
});
});
/* V 1.1:2 = Reply Sync button for multi source translation */
} catch(e){
console.log(e);
}
};
if((rContent != undefined) && (rContent != "")) {
drawCanvas(decodeURIComponent(rContent));
/** Update variable with selected language code **/
$scope.previousSelCode = code_l;
}
};
/**
* @function manageTranslation
* @description Managess the translation of given language for the thread
* @param {string} langCode - Language Code
* @param {string} tid - Thread ID
*/
$scope.manageTranslation = function (langCode, tid) {
//debugger;
$scope.showTrText = false;
/* V 2.0:5 = actualStatus variable introduced to indicate detailed connector status on UI. This variable holds the actual translation percentage */
$scope.transPercent = "";
$scope.actualStatus = "";
if (tid != "") {
var bulkTranslation = lithiumPlugin.bulkTranslation(langCode, tid);
bulkTranslation.then(function (trContent) {
if(trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, langCode);
if(langCode != "en-US") {
$scope.showTrText = true;
}
}
if((trContent.status != "NA") && trContent.status != null) {
// $scope.transPercent = String(trContent.status);
$scope.actualStatus = String(trContent.status);
} else {
// $rootScope.errorMsg = "Translation is in progress. Please check again a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
$scope.workbench = trContent.wb;
/* V 2.0:4 = Trigger uncalled or delayed callbacks (documnet uploaded/translation completed from lithium).*/
if(trContent.callback == 'true') {
var trCompletCallback = lithiumPlugin.trCompletCallback(langCode, trContent.docID);
trCompletCallback.then(function (callback){
// $rootScope.errorMsg = "Downloading Translated content in " + langCode + " now. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if (trContent.callback == 'upload') {
var trCompletUpload = lithiumPlugin.trCompletUpload(langCode, trContent.docID);
trCompletUpload.then(function (callback) {
//$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
$rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
});
} else if ("many" == "one") {
$scope.updateOOS();
} else if("SmartConx" == "SmartConx"){
if ("many" == "many"){
$scope.updateOOS();
}
}else if ((trContent.status != null) && trContent.status.includes("100")) {
/* If everything fine then only check Out of Sync status */
$scope.updateOOS();
} else {
/* If translation perccent is less than 100 then show the percentage on UI */
$scope.transPercent = $scope.actualStatus;
}
});
}
}
/**
* @function selectThisLang
* @description Called on select dropdown.
* @param {string} lang - Language code
*
*/
$scope.selectThisLang = function (lang, anonymousFlag) {
/* 1.4:3 Update Analytics on language selection */
try {
lingoThreadLangSelected(lang, '910880');
} catch (e) {
}
/** Display Translated content **/
var getTranslation = lithiumPlugin.getTranslation(lang, "910880");
getTranslation.then(function (trContent) {
if (trContent.body != "") {
$scope.showPreview(trContent.body, $scope.mszList, lang);
} else {
//$rootScope.errorMsg = "Translation is in progress. Please check again in a few minutes."
$rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
}
});
};
var decodeEntities = (function() {
// this prevents any overhead from creating the object each time
var element = document.createElement('div');
function decodeHTMLEntities (str) {
if(str && typeof str === 'string') {
// strip script/html tags
str = str.replace(/