|
POST
|
Thanks Robert, I swear I tried this yesterday but apparently I was missing something. I tried your code and it is working now, I will experiment further and mark this as the answer if this works for what I am trying to do. So far so good.
... View more
03-01-2017
06:56 AM
|
2
|
0
|
4422
|
|
POST
|
I am an trying to use map.on("load") but when I put it into my code, a blank map shows. Without it, the map displays just fine. I must be missing something simple here, but I can't find the issue. Thanks for any assistance in resolving this. Mele <!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>Search with Suggestion Template</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.19/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.19/esri/css/esri.css">
<style>
html,
body,
#map {
height: 90%;
width: 90%;
margin: 0;
padding: 0;
}
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
#LocateButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
</style>
<script src="https://js.arcgis.com/3.19/"></script>
<script>
require([
"esri/map", "esri/tasks/locator", "esri/dijit/Search", "esri/layers/FeatureLayer", "esri/InfoTemplate","esri/geometry/Extent", "esri/layers/ArcGISTiledMapServiceLayer","esri/dijit/LocateButton","dojo/_base/array", "dojo/dom", "esri/tasks/GeometryService", "esri/tasks/IdentifyTask", "esri/tasks/IdentifyParameters", "dojo/domReady!"
], function (Map, Locator, Search, FeatureLayer,InfoTemplate,Extent,ArcGISTiledMapServiceLayer,LocateButton, array, dom, GeometryService, IdentifyTask, IdentifyParameters)
{
var customBasemap = new ArcGISTiledMapServiceLayer("https://maps/arcgis/rest/services/Base_Map/MapServer");
var map = new Map("map", {
extent: new Extent({xmin:675912,ymin:886288,xmax:755209,ymax:1060473,spatialReference:{wkid:2223}}),
zoom: 0
});
map.on("load", alert("loaded"));
map.addLayer(customBasemap);
esriConfig.defaults.geometryService = new GeometryService("https://maps/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var lyrFields;
var URL = "https://maps/arcgis/rest/services/Parcel_Information/MapServer/25"
fl = new FeatureLayer(URL);
var ParcelsURL = "https://maps/arcgis/rest/services/Parcel_Information/MapServer";
geoLocate = new LocateButton({
map: map
}, "LocateButton");
geoLocate.startup();
var search = new Search({
sources: [
{
featureLayer: fl,
searchFields: ["fulladdr"],
displayField: "fulladdr",
exactMatch: false,
outFields: ["parcel_code", "fulladdr", "lot_number", "subdiv_name"],
name: "Parcels",
placeholder: "3629 N Drinkwater",
maxResults: 10,
maxSuggestions: 10,
//Create an InfoTemplate and include three fields
infoTemplate: new InfoTemplate("Parcels", "Address: ${fulladdr}</br>APN: ${parcel_code}</br>Lot Number: ${lot_number}</br>Subdivision: ${subdiv_name}"),
enableSuggestions: true,
enableInfoWindow: false,
minCharacters: 0
},
],
map: map,
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>" + getFldAlias(attr) + ":</b> " + featureAttributes[attr] + "<br>");
}
}
dom.byId("info").innerHTML = resultItems.join("");
}
function getFldAlias(fieldName) {
var retVal = "";
console.info(fl);
array.some(fl.fields, function(item) {
if (item.name === fieldName) {
retVal = item.alias;
return true;
}
});
return retVal;
}
});
</script>
</head>
<body>
<div id="LocateButton"></div>
<div id="search"></div>
<div id="map"></div>
</body>
<div id="info" style="margin: 5px; padding: 5px; background-color: #eeeeee;">
</html>
... View more
03-01-2017
05:21 AM
|
0
|
7
|
6969
|
|
POST
|
It was something simple that I was overlooking. I needed to add my related table to my AGOL web map. The related table is now editable in Web AppBuilder. Mele
... View more
02-27-2017
08:01 AM
|
0
|
0
|
2159
|
|
POST
|
I have an SDE feature class and an SDE Table that have a relationship class in SDE. I can add related table records and edit them in ArcMap. I published the MXD as a map service and then created an AGOL web map. I can see the related records in my web map on AGOL. When I go to Web AppBuilder (Developer Edition) 2.3 and use the edit widget, I don't see the related table records nor do I see them when viewing the attributes. Is there something I am missing in the configuration to get this to work? Thanks, Mele
... View more
02-25-2017
01:58 PM
|
0
|
6
|
3318
|
|
POST
|
I am working on a story map for our Fire Department. We have 15 Stations, with numbers from 1-16, skipping the number 12 which is reserved for future expansion. How can I skip the number 12 and have my tour numbers reflect the station number 1-11, 13-16? I have tried to put in a 'fake' location for 12, but the tour stops on this point and shows a missing image. Thanks, Mele
... View more
01-27-2017
07:53 AM
|
0
|
1
|
1283
|
|
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
|
3282
|
|
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
|
970
|
|
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
|
2133
|
|
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
|
2066
|
|
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
|
2066
|
|
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
|
2066
|
|
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
|
61130
|
|
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
|
61130
|
|
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
|
94669
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-27-2026 09:23 AM | |
| 1 | 02-26-2026 06:47 AM | |
| 3 | 10-20-2025 05:21 AM | |
| 1 | 03-13-2015 04:39 PM | |
| 1 | 09-18-2025 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|