Select to view content in your preferred language

Support implementing Mt Government Template?

6508
29
Jump to solution
02-16-2012 01:22 PM
Labels (1)
SteveNelson
Frequent Contributor
I'm looking for some support in implementing the My Government Services (ArcGIS10) template found here 
http://www.arcgis.com/home/item.html?id=672504d2d0ab4cb993fe10f6f78bf12b

I have things almost working, however I just get a white/blank screen.  Can't seem to get the data/map to show up and draw.
Can I submit my config.txt file here for support?
Thanks
Steve
0 Kudos
29 Replies
LindsayThomas
Esri Contributor
Hi Leitha,

The application does require you to have ASP.NET 4 set as the application pool. The application will spin at the beginning if this isn't set.

The .NET Framework 4 can be installed side-by-side with previous versions of the .NET Framework on a single computer. If IIS was previously enabled on the computer, the setup process for the .NET Framework automatically registers ASP.NET 4 with IIS. Check out this Microsoft article for more information on setting up the ASP .NET 4 application pool  http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx

Cheers,
Lindsay
0 Kudos
SteveNelson
Frequent Contributor
Hi Lindsay,
The basemap services are all cached by defailt since both my basemaps are being pulled from arcgisonline.
Again, on opening the app, everything works including basemaps.
I click on the map to enter a point/address, the app zooms out with what looks like the point I clicked on added to the map with the little icon,
Then it just spins 'loading....' and never comes back.
Anythng else to try here?
I could post or send you the config code if that might help?
Steve
0 Kudos
SteveNelson
Frequent Contributor

    //Name of the application.
'ApplicationName' : "MyBanff Services",

//Icon for the application.
'ApplicationImage' : "images/FSMCIcon.png",

    //Initial extent of map. To separate values use �??,�?� symbol.
'DefaultExtent':"-12873100, 6649270, -12857100, 6656170",

//Deafault Address to search
'DefaultAddress':"110 Bear St, Banff, AB",

//URL for help file
'helpURL' : "help.html",

//Renderer color for selected feature.
'RendererColor' : "#CC6633",

//Color for the route symbol
'RouteColor':"#CC6633",

//Width of the route
'RouteWidth':4,

//Size of the ripple
'RippleSize':30,

//Zoom level for the map
'ZoomLevel':6,

//Define fields to use for address geocoding. Multi-field input for address geocoding, define four fields i.e. "Address,City,State,Zip" (supported by ArcGIS 9.X and 10 geocoding services).
'LocatorFields' : ["Address", "City", "State"],

//URL to the ArcGIS Server REST endpoint of a geocoding service.
'Locator' : "http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA/GeocodeServer",

//URL to the ArcGIS Server REST resource used to perform geometry actions.
'GeometryService' : "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/Geometry/GeometryServer",

//URL used used for drawing the route between two points.
'RouteMapURL' : "http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route",

//Message appears when the  application start.
'SplashScreenMessage' : "<b>Welcome to MyBanff Services</b><br/><hr/><br/>The <b>MyBanff Services</b> application helps residents locate a government facility and obtain information about curbside and dropoff services provided by the Town of Banff. This application is typically used by residents in a community, but can be used by visitors to locate a library or post office near them. <br/> <br/>To locate a service, simply enter an address or activity in the search box, or use your current location.  Your location will then be highlighted on the map and relevant information about available curbside and dropoff services will be presented to the user.<br/><br/>",

//Basemap layer collection. (All the basemap�??s need to be in the same spatial reference)
'BaseMapLayers' : [
    {"Key": "publicAccess", "ThumbnailSource": "images/imgPublicAccess.png", "Name" : "Topographical", MapURL: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"},
    {"Key": "imageryHybrid", "ThumbnailSource": "images/imgImageryHybrid.png", "Name" : "Streets", MapURL: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"}
   ],
  
//Operational layer collection.  
'Services':[
//{"Name":"Trash Pickup","Image":"images/trash.png","hasRendererImage":false,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/5","FieldNames" : [{"Day":"MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY"},{"DisplayText":"Agency","FieldName":"AGENCY"},{"DisplayText":"Contact","FieldName":"CONTACT"},{"DisplayText":"Phone","FieldName":"PHONE"},{"Website":"AGENCYURL"},{"Email":"EMAIL"}],"Color":"#FCD208","isRendererColor":false,"LayerVisibility":true},
//{"Name":"Recycling Pickup","Image":"images/recycling.png","hasRendererImage":false,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/6","FieldNames" : [{"Day":"MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY"},{"DisplayText":"Agency","FieldName":"AGENCY"},{"DisplayText":"Contact","FieldName":"CONTACT"},{"DisplayText":"Phone","FieldName":"PHONE"},{"Website":"AGENCYURL"},{"Email":"EMAIL"}],"Color":"#0000FF","isRendererColor":false,"LayerVisibility":true},
//{"Name":"Yard Waste Pickup","Image":"images/yardWaste.png","hasRendererImage":false,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/8","FieldNames" : [{"Day":"MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY"},{"DisplayText":"Agency","FieldName":"AGENCY"},{"DisplayText":"Contact","FieldName":"CONTACT"},{"DisplayText":"Phone","FieldName":"PHONE"},{"Website":"AGENCYURL"},{"Email":"EMAIL"}],"Color":"#250517","isRendererColor":false,"LayerVisibility":true},
//{"Name":"Street Cleaning","Image":"images/streetCleaning.png","hasRendererImage":false,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/7","FieldNames" : [{"Week":"WEEKONE,WEEKTWO,WEEKTHREE,WEEKFOUR"},{"DisplayText":"Agency","FieldName":"AGENCY"},{"DisplayText":"Contact","FieldName":"CONTACT"},{"DisplayText":"Phone","FieldName":"PHONE"},{"Website":"AGENCYURL"},{"Email":"EMAIL"}],"Color":"#00FF00","isRendererColor":false,"LayerVisibility":true},
{"Name":"Libraries","Image":"images/library.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/4","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Post Offices","Image":"images/postOffice.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/3","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Police Stations","Image":"images/policestations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/1","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Fire Stations","Image":"images/fireStations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/2","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Hospitals","Image":"images/hospital.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/0","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}
],

//Fields for Displaying the features as info window header.  
'InfoWindowHeader' :"FacilitySitePoint.FEATURECODE",

//Collection of fields that are displayed as details in info window.
'InfoPopupFieldsCollection' : [    
  {"DisplayText":"Name", "FieldName": "FacilitySitePoint.NAME"},
  {"DisplayText":"Address", "FieldName": "FacilitySitePoint.FULLADDR"},
  {"DisplayText":"Contact", "FieldName": "GovServiceInfo.CONTACT"},
  {"DisplayText":"Phone", "FieldName": "GovServiceInfo.PHONE"},
  {"DisplayText":"Email", "FieldName": "GovServiceInfo.EMAIL"}, 
  {"DisplayText":"Days Open", "FieldName": "GovServiceInfo.OPERDAYS"},
  {"DisplayText":"Hours of Operation", "FieldName": "GovServiceInfo.OPERHOURS"}   
],

//This value will display when there is no data in the info window.
"DisplayValue":"N/A",

//This value defines the maximum height  in pixels that can be attained by the infowindow.
"InfoWindowHeight":190,

//This value defines the maximum width in pixels that can be attained by the infowindow.
"InfowindowWidth":300,

//This consists of both tiny URL and social networking site URL.
'TinyURLServiceURL' : { "URL": "http://api.bit.ly/v3/shorten?login=esri&apiKey=R_65fd9891cd882e2a96b99d4bda1be00e&uri=${0}&format=json" , "ResponseAttribute": "data.url",
       "FacebookShareURL" : "http://www.facebook.com/sharer.php?u=${0}&t=Find%20Services%20in%20My%Community",
       "TwitterShareURL" : "http://twitter.com/home/?status=Find%20Services%20in%20My%20Community' ${0}",
       "MailShare" : "mailto:%20?subject=Checkout%20this%20Town of Banff%20service%20map!&body=${0}" }

}
0 Kudos
LindsayThomas
Esri Contributor
Steve,

If you map document dataframe in WGS_1984_Web_Mercator_Auxiliary_Sphere?

Cheers,
Lindsay
0 Kudos
SteveNelson
Frequent Contributor
Hey Lindsay - yes it is.
0 Kudos
LindsayThomas
Esri Contributor
Steve,
Have you changed the database schema at all? Are you able to access your rest end points from the Rest Directory?
Cheers,
Lindsay
0 Kudos
SteveNelson
Frequent Contributor
Yes I can see my rest endpoints and no I haven't made any schema changes, just loaded my own location points of course.
I did  comment out some of the layers though as you can see in the config file - don't think that would cause any error though would it?
I just don't have use for those layers right now - the trash pickup, recylcling, street cleaning, yeard waste.
0 Kudos
LindsayThomas
Esri Contributor
Steve,

Please remove the commented out lines. Because you are commenting in the middle of a [ ] this could be effecting it. Once you make this change, clear your browser cache, refresh your browser and hopefully that works.

(Also, is your proxy.config set correctly with all the referenced services in your config.txt ?)

Cheers,
Lindsay
0 Kudos
SteveNelson
Frequent Contributor
No change when removing the commenting out I added for the layers I'm not using.

I'll paste the contents of the proxy.config - looks good to me...??

<?xml version="1.0" encoding="utf-8" ?>
<!-- Proxy config is used to set the ArcGIS Server services that the proxy will forward to.
       
        mustMatch: true to only proxy to sites listed, false to proxy to any site -->
<ProxyConfig mustMatch="true">
  <serverUrls>
    <!-- serverUrl options:
            url = location of the ArcGIS Server, either specific URL or stem
            matchAll = true to forward any request beginning with the url
            token = (optional) token to include for secured service
            dynamicToken = if true, gets token dynamically with username and
              password stored in web.config file's appSettings section.
    -->
    <serverUrl url="http://maps.tob.int/ArcGIS/rest/services/"
                  matchAll="true"></serverUrl>
 
    <serverUrl url="http://maps.tob.int/ArcGIS/rest/services/"
                  matchAll="true"></serverUrl>
  </serverUrls>

</ProxyConfig>
0 Kudos
LindsayThomas
Esri Contributor
Steve,

Please add the line below to your proxy.config.

<serverUrl url="http://tasks.arcgisonline.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>

Javascript can be picky when an extra comma exists or is missing, in the code box below. Notice the code section below, I removed the commented section that each entry in the [ ] is separated by a comma except for the very last entry. That is the correct format.

'Services':[
{"Name":"Libraries","Image":"images/library.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/4","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Post Offices","Image":"images/postOffice.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/3","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Police Stations","Image":"images/policestations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/1","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Fire Stations","Image":"images/fireStations.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/2","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true},
{"Name":"Hospitals","Image":"images/hospital.png","hasRendererImage":true,"ServiceUrl": "http://maps.tob.int/ArcGIS/rest/services/Amazon_Testing/GovernmentServices/MapServer/0","distance" : 4,"FieldNames" : [{"ContactField":"FacilitySitePoint.NAME"},{"AddressField":"FacilitySitePoint.FULLADDR"},{"PhoneField":"GovServiceInfo.PHONE"}],"LayerVisibility":true}
],


Let me know how it goes.
-Lindsay
0 Kudos