|
POST
|
Roshni, What I was able to do was add my HTML file to an IIS web server running locally on my machine and then I was able to use IE to view it. I was never able to view the file in IE directly if the HTML was on a local file system. If you have Chrome installed, Chrome will allow you to view the HTML file on a local file system without error. Mele
... View more
01-04-2017
09:09 AM
|
0
|
1
|
2014
|
|
POST
|
Robert, Yes, we are using a map service that does support suggestions and it does return results, but what I would like to do is to be able to have it return results without all of the address being sequential. In the example I posted for 10099 E HAPPY RIDGE RD APT 305 If I type in "10099" I get results or "10099 E" or "10099 E HAP" I get results but if I leave out the direction and just type "10099 HAP" I don't get anything back. I understand that the LIKE query is looking for the direction component. I would like to have the user input just portions without the direction and get results. Thanks Mele
... View more
12-26-2016
09:17 AM
|
0
|
1
|
765
|
|
POST
|
I like the speed and ease of use of the ArcGIS JavaScript Search Widget. I would like to modify it to search and return suggestions each time a space is entered. We have some addresses in our City which would be easier to find if we could execute the search each time a space was entered and return some suggestions. For instance, The Full Address is 10099 E HAPPY RIDGE RD APT 305 and I would like to allow the user to enter just portions of the address such as 10099 HAPPY RIDGE 305 and Get the same suggestions back as entering the full address. It looks like the search is conducting a LIKE on the string so I would like to do a LIKE each time a space is entered. Anyone modified the Search Widget to do something like this? Thanks, Mele
... View more
12-22-2016
01:45 PM
|
0
|
3
|
1928
|
|
POST
|
Thanks for the further information. I was looking at the LocalLayerWidget but what I have is an existing WAB app and would rather not have to change too much. I know what you mean about using as little of AGOL as possible. We have our WAB hosted locally but it still pulls the WebMap from AGOL. In hindsight I wish I had used the LocalLayerWidget. I will review the other links you sent. Thanks again! Below is my proxy.config and config.json files <serverUrl url="https://myserver/arcgis/rest/services/Intersectionpoints/MapServer"
username="name"
password="pwd"
matchAll="true"
></serverUrl> "httpProxy": {
"useProxy": true,
"url": "http://mymachine/proxy/proxy.ashx",
"rules": [
{
"urlPrefix": "https://myserver/arcgis/rest/services/Intersectionpoints/MapServer",
"proxyUrl": "http://mymachine/proxy/proxy.ashx"
},
{
"urlPrefix": "http://maps.arcgis.com",
"proxyUrl": "http://mymachine/proxy/proxy.ashx"
}
]
}
... View more
11-29-2016
03:34 PM
|
0
|
1
|
1398
|
|
POST
|
Rebecca, Thanks for the resources. It does look like the last link is what I need, but I can't quite get over the hump. Just to clarify, we are using the WAB Developer Edition hosted locally. The WebMap is hosted on AGOL and has a ArcGIS Server Security Secured service. I will keep plugging away and see if the links you sent have something that I am missing. Mele
... View more
11-29-2016
01:21 PM
|
0
|
1
|
1398
|
|
POST
|
I am using Web App Builder with an AGOL web map. I would like to use a Secured ArcGIS Server Map Service within the AGOL web map. I have been working to pass in the credentials in a proxy.config file, but have not had much luck. The map loads in Web App Builder, but I need to login to get to the Secured Service. Have you had success in doing this? Thanks, Mele
... View more
11-29-2016
12:19 PM
|
0
|
3
|
1398
|
|
POST
|
Dan, Yes it was there. It was a little counter intuitive to me at first. If I Insert the Service Layer Credits as Dynamic Text, I can place it either off the layout frame or give it a text color of 'no color' and it does not show up. Thanks!
... View more
11-11-2016
09:12 AM
|
8
|
1
|
57214
|
|
POST
|
Thanks Adrian, I did see that this could be done in ArcMap, but I was not able to find the same thing in ArcGIS Pro. I can add the text again with dynamic text, but cannot remove it as of yet. Mele
... View more
11-10-2016
03:37 PM
|
0
|
1
|
57214
|
|
POST
|
I would like to be able to remove the Base map Service Layer Credits. I think it is confusing for the map user as it looks like it is the source for the data shown and not the base map Is there a way to do this?
... View more
11-10-2016
02:56 PM
|
2
|
16
|
89827
|
|
POST
|
Robert, Thanks for helping me uderstand the search widget a little better. I am able to return the fields I need. I appreciate you getting me on the right track. I am currently hung up on how to get the Field Aliases and use those in the results from the search widget rather than the field names but my code is much cleaner now. If you can assist with the field alias I would appreciate it. I had used your earlier method, but it looks like what is returned in the search widget does not have the alias for the fields. <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="https://js.arcgis.com/3.18/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css">
<script src="https://js.arcgis.com/3.18/"></script>
<style>
}
</style>
<script>
require([
"dojo/dom", "dojo/on",
"esri/dijit/Search", "esri/layers/FeatureLayer", "dojo/_base/array", "dojo/domReady!"
], function (dom, on, Search, FeatureLayer, array) {
var lyrFields;
var URL = "https:myServer//rest/services/MyService/MapServer/25"
var search = new Search({
sources: [{
featureLayer: new FeatureLayer(URL),
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["fulladdr", "parcel_code", "lot_number", "subdiv_name"],
name: "Address",
maxResults: 1,
maxSuggestions: 20,
enableSuggestions: true,
minCharacters: 1
}],
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
search.startup();
var selectionMade = search.on("select-result", selectionHandler);
function selectionHandler(evt){
var resultItems = [];
{
var featureAttributes = evt.result.feature.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + featureAliases[attr] + ":</b> " + featureAttributes[attr] + "<br>");
}
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
</head>
<p>Enter your address in the text box to get more details about your property for the form below:</p>
<div id="search" ></div>
<br />
<br />
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;">
</div>
<br />
... View more
11-03-2016
11:49 AM
|
0
|
2
|
2194
|
|
POST
|
Robert, Thanks for your response. I may have not been using pagination correctly. I am looking for the Auto Complete function in the Search Widget. While I did get it to list the suggestions, for some reason I can't select a suggestion, and then use that in a QueryTask. I feel like I am close, but am missing something. I think it might be event when a suggestion is selected. <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Query State Info without Map</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.18/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css">
<script src="https://js.arcgis.com/3.18/"></script>
<style>
html,
body,
#search {
display: block;
cursor: pointer;
}
</style>
<script>
require([
"dojo/dom", "dojo/on",
"esri/tasks/query", "esri/tasks/QueryTask","esri/dijit/Search","esri/InfoTemplate", "esri/layers/FeatureLayer", "dojo/_base/array", "dojo/domReady!"
], function (dom, on, Query, QueryTask, Search, InfoTemplate, FeatureLayer,array) {
var lyrFields;
var URL = "https://MyServer/arcgis/rest/services/MyService/MapServer/25"
var queryTask = new QueryTask(URL);
var query = new Query();
query.returnGeometry = false;
query.outFields = [
"fulladdr", "parcel_code", "lot_number"
];
on(dom.byId("execute"), "click", execute);
var search = new Search({
sources: [{
featureLayer: new FeatureLayer(URL),
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["parcel_code", "fulladdr", "lot_number", "subdiv_name"],
name: "Address",
maxResults: 10,
maxSuggestions: 20,
//Create an InfoTemplate and include three fields
//infoTemplate: new InfoTemplate("Address", "Address: ${fulladdr}"),
enableSuggestions: true,
minCharacters: 0
}],
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
search.startup();
function execute () {
query.text = dom.byId("search").value;
queryTask.execute(query, showResults);
}
function showResults (results) {
var resultItems = [];
var resultCount = results.features.length;
lyrFields = results.fields
if (resultCount != 0) {
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features[i].attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
}
else
{
dom.byId("info").innerHTML = "Address Not Found";
}
}
function getFldAlias(fieldName){
var retVal = "";
array.some(lyrFields, function(item){
if(item.name === fieldName){
retVal = item.alias;
return true;
}
});
return retVal;
}
});
</script>
</head>
<p>Enter your address in the text box to get more details about your property for the form below:</p>
<div id="search" ></div>
<input id="execute" style="font-weight: bold;" type="button" value="Click here for details" />
<br />
<br />
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;">
</div>
<br />
... View more
11-02-2016
03:12 PM
|
0
|
4
|
2194
|
|
POST
|
Robert, Thank you. This is perfect, I could not find any samples like this so I appreciate you posting this!
... View more
11-02-2016
10:29 AM
|
0
|
0
|
1189
|
|
POST
|
Thanks Robert for the sample. It helps, but what I was trying to do was get the AutoComplete in the Search widget to work without a map and pass the results of the search to a Query Task or use the Out fields from the Search widget. I would appreciate any assistance with this. Thanks <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Query State Info without Map</title>
<script src="https://js.arcgis.com/3.18/"></script>
<style>
html,
body,
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
</style>
<script>
require([
"dojo/dom", "dojo/on",
"esri/tasks/query", "esri/tasks/QueryTask", "esri/dijit/Search","esri/InfoTemplate", "esri/layers/FeatureLayer", "dojo/domReady!"
], function (dom, on, Query, QueryTask, Search, InfoTemplate, FeatureLayer) {
var queryTask = new QueryTask("URL to Feature Server");
var query = new Query();
query.returnGeometry = false;
query.outFields = [
"fulladdr", "parcel_code", "subdiv_name", "lot_number"
];
on(dom.byId("execute"), "click", execute);
var search = new Search({
sources: [{
featureLayer: new FeatureLayer("URL to Feature Server"),
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["parcel_code", "fulladdr"],
name: "Parcels",
maxResults: 10,
maxSuggestions: 20,
//Create an InfoTemplate and include three fields
//infoTemplate: new InfoTemplate("Parcels", "Address: ${fulladdr}"),
enableSuggestions: true,
minCharacters: 0
}],
allPlaceholder: "Find Address",
activeSourceIndex: "all"
}, "search");
function execute () {
query.text = dom.byId("search").value;
queryTask.execute(query, showResults);
}
function showResults (results) {
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features[i].attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
</head>
<body>
<div id="search" ></div>
<input id="execute" type="button" value="Get Details">
<br />
<br />
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
</body>
</html>
... View more
11-01-2016
04:53 PM
|
0
|
6
|
2194
|
|
POST
|
I am using the QueryTask and would like to use the Alias in the results rather than the field names. The documentation sounds like I can do this https://developers.arcgis.com/javascript/3/jshelp/intro_querytask.html You must use the actual field names rather than the alias names, but you can use the alias names later when you display the results. but I could not find an example for doing this programmatically. Can someone provide an example of using the Alias Names rather than the Field names in the results from the Query Task? Thanks, Mele
... View more
11-01-2016
04:32 PM
|
0
|
2
|
2229
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-20-2025 05:21 AM | |
| 1 | 03-13-2015 04:39 PM | |
| 1 | 09-18-2025 08:33 AM | |
| 1 | 05-12-2025 03:17 PM | |
| 1 | 08-15-2025 03:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|