# ScriptDoc Reference

## Functions

### Mapifies.SearchAddress(jQuery element, Object options, Function callback) : static Function

The SearchAddress function takes a map, options and callback function. The options can contain either an address string, to which a point is returned - or reverse geocoding a GLatLng, where an address is returned

jQuery | element | The jQuery object containing the map element.
Object | options | An object of options
Function | callback | The callback function that returns the result

### Mapifies.SearchAddress.defaults(String query, String returnType, GGeoCache cache, String countryCode) : static Object

Default options for SearchAddress

String | query | The Address or GLatLng to query in the geocoder
String | returnType | The type of value you want to return from Google. This is mapped to the function names available, the options are 'getLatLng' which returns coordinates, and 'getLocations' which returns points.
GGeoCache | cache | The GGeoCache to store the results in if required
String | countryCode | The country code to localise results

### Mapifies.SearchDirections(jQuery element, Object options, Function callback) : static Function

The SearchDirections function allows you to search for directions between two or more points and return it to a map and a directions panel

jQuery | element | The jQuery object containing the map element.
Object | options | An object of options
Function | callback | The callback function that returns the result

### Mapifies.SearchDirections.defaults(String query, String panel, String local, String travelMode, Boolean avoidHighways, Boolean getPolyline, Boolean getSteps, Boolean preserveViewport, Boolean clearLastSearch) : static Object

Default options for SearchDirections

String | query | The directions query to parse. Must contain one 'from:' and one 'to:' query, but can contain multiple 'to:' queries.
String | panel | The ID of the panel that the directions will be sent to.
String | local | The local for the directions.
String | travelMode | Allows you to specify the travel mode, either 'driving' or 'walking'. Driving is the default.
Boolean | avoidHighways | Allows you to avoid Highways/Motorway's on trips. Please note this may not always be possible depending on the route.
Boolean | getPolyline | Decides if the returned result will draw a polyline on the map on the journey. Default is True.
Boolean | getSteps | Decides if the textual directions are returned to the directions panel.
Boolean | preserveViewport | Decides if the map will zoom and center in on the directions results.
Boolean | clearLastSearch | Clears the last direction search if you do not want to have multiple points.