Class OracleELocation

Object
   |
   +--OracleELocation

class OracleELocation


This class provides a number of convenient methods for accessing Oracle's eLocation Geocoding and Routing services.
Defined in oracleelocationv3.9.js


Field Summary
<static>  Object AUTOCOMPLETE_ON_SELECTION_DO_NOTHING
          eLocation Autocomplete behavior: Don't modify input text when an option is selected
<static>  Object AUTOCOMPLETE_ON_SELECTION_REPLACE
          eLocation Autocomplete behavior: Replace input text with current selection (default)
<static>  Object ERROR_GEOCODE_FAILED
          Geocoder Error code: Geocoder has encounted internal error.
<static>  Object ERROR_ROUTE_ADDR_INVALID
          Router Error code: One or more input addresses can not be geocoded or the geocoded results might not be accurate.
<static>  Object ERROR_ROUTE_FAILED
          Router Error code: Router has encounted internal error.
<static>  Object ERROR_ROUTE_NOT_FOUND
          Router Error code: Route can not be calculated.
<static>  Object ERROR_UNEXPECTED_SERVER_RESPONSE
          eLocation Error code: eLocation returned an unexpected response.
<static>  Object TARGET_CLIENT
          The target map client.
 
Constructor Summary
OracleELocation(<String> elocURL, <String> localImagesURL, <String> appId)
           
 
Method Summary
 void attachEventListenerToRoute(routeId, eventType, eventHandler)
          

Attach event handlers to routes and route segments, such as:

  • OM.event.MouseEvent.MOUSE_CLICK
  • OM.event.MouseEvent.MOUSE_RIGHT_CLICK
  • OM.event.MouseEvent.MOUSE_OVER
  • OM.event.MouseEvent.MOUSE_OUT
The eventHandler function should define a parameter where the actual event will be filled.
 void autocomplete(<Object> input, <Function> callback, <Object> options)
           This method adds event listeners to an HTML input element rendered on the page and retrieves address suggestions based on what the user types.
 Object batchGeocode(addressArray, <Function> callBack, <Function> errHandler, <Object> mapOptions)
           This method invokes the geocoder on eLocation to obtain the longitude/latitude information for a given Array of addresses.
 Object captureMap(mapDiv)
          

Captures the map contents using the html2canvas API.

 void changeRouteStyle(<Array> routeStyles)
          

Updates the draw color/style for already drawn routes on the map.

 void detachEventListenerFromRoute(routeId, eventType, eventHandler)
          

Detach event handlers from routes and route segments, such as:

  • OM.event.MouseEvent.MOUSE_CLICK
  • OM.event.MouseEvent.MOUSE_RIGHT_CLICK
  • OM.event.MouseEvent.MOUSE_OVER
  • OM.event.MouseEvent.MOUSE_OUT

 void drawMarker(gcAddress, params)
          

Draws a marker on the map

 Object generateShareableURL(<Array> addresses, <Object> options)
          

Generates a URL to easily share and embed an Oracle map that features either a predefined route or a marker.
When the input address is a single location (string), the map will render a single marker.

 void geocode(<Object> address, <Function> callBack, <Function> errHandler, <Object> mapOptions)
           This method invokes the geocoder on eLocation to obtain the longitude/latitude information for a given street address.
 Object geocodeForUS(address, callBack, errHandler, mapOptions, geocodeFunc)
          
 void getDirections(<Array> routes, <Function> callBack, <Function> errHandler, <Object> routeOptions, <Object> mapOptions)
          

This method invokes the eLocation routing engine to caculate route and/or driving directions between destinations.

 void removeRoutesFromMap(<Array> routeArray)
           Removes routes drawn on the map.
 void saveMapAsPNG(mapDiv, filename)
          

Captures the map contents using the html2canvas API and triggers a "Save as..." dialog with the generated image.

 void setInfoTip(featureId, <String> infoTipTxt)
           Sets specific infoTip on drawn routes

Field Detail

AUTOCOMPLETE_ON_SELECTION_DO_NOTHING

<static> Object AUTOCOMPLETE_ON_SELECTION_DO_NOTHING

AUTOCOMPLETE_ON_SELECTION_REPLACE

<static> Object AUTOCOMPLETE_ON_SELECTION_REPLACE

ERROR_GEOCODE_FAILED

<static> Object ERROR_GEOCODE_FAILED

ERROR_ROUTE_ADDR_INVALID

<static> Object ERROR_ROUTE_ADDR_INVALID

ERROR_ROUTE_FAILED

<static> Object ERROR_ROUTE_FAILED

ERROR_ROUTE_NOT_FOUND

<static> Object ERROR_ROUTE_NOT_FOUND

ERROR_UNEXPECTED_SERVER_RESPONSE

<static> Object ERROR_UNEXPECTED_SERVER_RESPONSE

TARGET_CLIENT

<static> Object TARGET_CLIENT

Constructor Detail

OracleELocation

OracleELocation(<String> elocURL, <String> localImagesURL, <String> appId)

Method Detail

attachEventListenerToRoute

void attachEventListenerToRoute(routeId, eventType, eventHandler)

autocomplete

void autocomplete(<Object> input, <Function> callback, <Object> options)

batchGeocode

Object batchGeocode(addressArray, <Function> callBack, <Function> errHandler, <Object> mapOptions)

captureMap

Object captureMap(mapDiv)

changeRouteStyle

void changeRouteStyle(<Array> routeStyles)

detachEventListenerFromRoute

void detachEventListenerFromRoute(routeId, eventType, eventHandler)

drawMarker

void drawMarker(gcAddress, params)

generateShareableURL

Object generateShareableURL(<Array> addresses, <Object> options)

geocode

void geocode(<Object> address, <Function> callBack, <Function> errHandler, <Object> mapOptions)

geocodeForUS

Object geocodeForUS(address, callBack, errHandler, mapOptions, geocodeFunc)

getDirections

void getDirections(<Array> routes, <Function> callBack, <Function> errHandler, <Object> routeOptions, <Object> mapOptions)

removeRoutesFromMap

void removeRoutesFromMap(<Array> routeArray)

saveMapAsPNG

void saveMapAsPNG(mapDiv, filename)

setInfoTip

void setInfoTip(featureId, <String> infoTipTxt)


Documentation generated by JSDoc on Tue Nov 8 14:10:51 2022