Mapping Plug-ins
TicketRx can interface with mapping software to display ticket work locations on a map, by means of a plug-in interface. This interface is web-based: TicketRx calls a (configurable) URL with an HTTP request, passing the parameters below. The plug-in should then display a map, possibly by redirecting the user to a web-based mapping engine. This same mechanism can be used for locally installed mapping software (on the user's PC), by means of a localhost URL and appropriate piece of interface software.
The typical process flow is:
- TicketRx generates a set of ticket location parameters.
- The parameters are passed to the mapping plug-in.
- The mapping plug-in transforms the parameters to match what the mapping engine needs.
- The mapping engine shows the tickets on a map.
For each ticket, the following parameters are available:
| Parameter | Explanation |
|---|---|
| country | US or CA |
| state | State or Province |
| city | City |
| street_name | Street name |
| street_number | Street number (street_number + street_name = address) |
| street_dir | Street direction (for example the "N" in "N Main") |
| subdivision | Subdivision |
| location | Map location value on the ticket. The format is determined by what is sent by the call center (e.g. this may be in Township-Range-Section format or it may be a latitude/longitude value) |
| lat | Latitude, if available |
| long | Longitude, if available |
| ticket | Ticket number |
| ticket-trimmed | Ticket number, trimmed to the last hyphen (for example "A0123321" for "A0123321-00A" and "X04321" for "X04321") |
| description | Ticket message type + ticket type |
For plug-ins using HTTP POST requests, TicketRx always includes all of these parameters. For HTTP GET plugins only the parameters explicitly included in the query string are passed.
The TicketRx mapping feature can map multiple tickets at once, in this case a a parameter "ticket_count" is passed to the plug-in to indicate the number of tickets being mapped. The parameter names are extended with a suffix: _<index>, such as _1, _2, etc. to provide the data for each ticket.