Wreaths Across America: Family Pass Holders Pre-Registration for Parking - Published: Saturday, December 1, 2018

Registration is now open for valid Family Pass holders.  To access the form, please click read more.

 read more ...

ANC Public Service Methods


These methods are utilized by the ANC Public applications for dynamic maps and user experience. Being able to change which layers and data is presented to the public allows for more flexible applications without requiring app updates or redeployments.

The examples provided are written in c# and assume the service has been added to a project and instantiated as a variable called connection.

JsonResult GetMapTypes()

This method returns a JSONResult object of all available map types. The list provides the urls for the basemaps currently hosted by ANC. Currently this will return Imagery, Street and Hybrid layers. Name and ServiceUrl are available properties for each record in the Record property of the returned JSONResult.

Example (C#)

JsonResult GetPublicMapLayers()

This method returns all the layers that are available to the public in a JSONResult. Access the Records property of the result to obtain information about the layer. The LayerName,LayerAlias, LayerId, and GraphicLayerType are all available properties for each layer returned as a record. They are the ‘key' values for the records.

Example (C#)

Bool SubmitFeedback(string feedbackType, string feedbackText, string contactEmail, string contactName, string contactPhone)

This method allows for the submitting of feedback to ANC. ContactEmail, ContactName and ContactPhone are optional and only need to be provided if feedback is requested from ANC. If no contact information is sent, the feedback is not flagged for a return response. This method returns true if the feedback was entered correctly into the database. It returns false if there was an error.

Bool SubmitFeedbackWithDevice(string feedbackType, string feedbackText, string contactEmail, string contactName, string contactPhone, string deviceType)

This method allows for the submitting of feedback to ANC. This is the same as the SubmitFeedback method, but allows for the sending of the device type for feedback purposes, as the feedback my relate to a specific device. ContactEmail, ContactName and ContactPhone are optional and only need to be provided if feedback is requested from ANC. If no contact information is sent, the feedback is not flagged for a return response. This method returns true if the feedback was entered correctly into the database. It returns false if there was an error.

Example (C#)

JsonResult GetGpsLocations() - NOT CURRENTLY IN USE

This method was used to flag the current location of the buses on their routes. For the time being, this service has been disabled. The past use of this function allowed for the return of records which had NAME, ICON, DESCRIPTION and SHAPE as their keys or properties. This function utilized an external web site to obtain the information for the buses and formatted the data into the JSONResult for application processing.

JsonResult GetLayersByService(int serviceId)

This method returns layers associated with a specified service. The Records returned in the JSONResult can be accessed to obtain layer information contained in the service. The properties for each layer include LayerName, LayerAlias, LayerId, GraphicLayerType, DisplayFields, DisplayAliases, TitleField and DescField. They are the ‘key' values for the records.

Example (C#)

The return objects are structured as follows. The JsonResult is a serializable object that contains all of the necessary return data for the native ANC applications.

JsonResult

String ResultName

String NameColumn

String TotalCount

List Records

String[] ColumnNames

String[] ColumnAliases

String[] ExternalCols

String ExternalAbstract

JsonDictionary

Add(string key, object Value)

Get(string key)