org.opengts.war.maps.jsmap
Class GoogleMaps

java.lang.Object
  extended by org.opengts.war.tools.MapProviderAdapter
      extended by org.opengts.war.maps.JSMap
          extended by org.opengts.war.maps.jsmap.GoogleMaps
All Implemented Interfaces:
MapProvider

public class GoogleMaps
extends JSMap


Field Summary
 
Fields inherited from class org.opengts.war.maps.JSMap
DEFAULT_MAP_ID
 
Fields inherited from interface org.opengts.war.tools.MapProvider
DEFAULT_LATITUDE, DEFAULT_LONGITUDE, FEATURE_CENTER_ON_LAST, FEATURE_CORRIDORS, FEATURE_DETAIL_INFO_BOX, FEATURE_DETAIL_REPORT, FEATURE_DISTANCE_RULER, FEATURE_GEOZONES, FEATURE_LATLON_DISPLAY, FEATURE_REPLAY_POINTS, ID_DETAIL_CONTROL, ID_DETAIL_TABLE, ID_DISTANCE_DISPLAY, ID_LAT_LON_DISPLAY, ID_LATEST_BATTERY, ID_LATEST_EVENT_DATE, ID_LATEST_EVENT_TIME, ID_LATEST_EVENT_TMZ, ID_MESSAGE_TEXT, ID_ZONE_LATITUDE_, ID_ZONE_LONGITUDE_, ID_ZONE_RADIUS_M, MAP_HEIGHT, MAP_WIDTH, PROP_auto_count_device, PROP_auto_count_fleet, PROP_auto_enable_device, PROP_auto_enable_fleet, PROP_auto_interval_device, PROP_auto_interval_fleet, PROP_auto_onload_device, PROP_auto_onload_fleet, PROP_combineSpeedHeading, PROP_default_latitude, PROP_default_longitude, PROP_default_zoom, PROP_detail_showSatCount, PROP_iconSel_fleet, PROP_iconSel_fleet_legend, PROP_iconSelector, PROP_iconSelector_legend, PROP_info_inclBlankAddress, PROP_info_inclBlankOptFields, PROP_info_showAltitude, PROP_info_showOptionalFields, PROP_info_showSpeed, PROP_javascript_inline, PROP_javascript_src, PROP_map_fillFrame, PROP_map_height, PROP_map_includeGeozones, PROP_map_maxCreationAge, PROP_map_minProximity, PROP_map_pushpins, PROP_map_routeLine, PROP_map_routeLine_arrows, PROP_map_routeLine_color, PROP_map_routeLine_snapToRoad, PROP_map_view, PROP_map_width, PROP_maxPushpins_device, PROP_maxPushpins_fleet, PROP_maxPushpins_report, PROP_pushpin_zoom, PROP_replay_enable, PROP_replay_interval, PROP_replay_singlePushpin, PROP_scrollWheelZoom, PROP_zone_map_corridor, PROP_zone_map_height, PROP_zone_map_multipoint, PROP_zone_map_polygon, PROP_zone_map_width, ZONE_HEIGHT, ZONE_WIDTH
 
Constructor Summary
GoogleMaps(java.lang.String name, java.lang.String key)
           
 
Method Summary
 java.lang.String getApiVersion()
          Gets the API version
 java.lang.String[] getGeozoneInstructions(int type, java.util.Locale loc)
          Gets the Geozone usage instructions
 int getGeozoneSupportedPointCount(int type)
          Returns the number of supported points for the specified Geozone type
 java.lang.String getMapInitCallback()
          Gets the map initialization callback (may be null)
 java.lang.String getMapOptions()
          Gets the override map options
 boolean isVersion2()
          Return true if using Google API v2
 boolean isVersion3()
          Return true if using Google API v3
 boolean isVersionJS()
          Return true if using Google API "js"
 void postInit()
          Called after initialization of this MapProvider.
 boolean validate()
          Validates this map provider configuration
protected  void writeJSIncludes(java.io.PrintWriter out, RequestProperties reqState)
          Writes the JavaScript required for this map provider
protected  void writeJSVariables(java.io.PrintWriter out, RequestProperties reqState)
          Writes mapping support JS to stream
 void writeMapCell(java.io.PrintWriter out, RequestProperties reqState, MapDimension mapDim)
          Writes the map table view to the http output stream
 
Methods inherited from class org.opengts.war.maps.JSMap
_skipPropKey, getMapID, writeJavaScript, writeJSIncludes, writeMapUpdate, writePushpinArray, writeStyle
 
Methods inherited from class org.opengts.war.tools.MapProviderAdapter
_getIconLegendHtml, addSupportedFeature, getAuthorization, getAutoUpdateCount, getAutoUpdateEnabled, getAutoUpdateInterval, getAutoUpdateOnLoad, getCorridorInstructions, getDefaultCenter, getDefaultZoom, getDefaultZoom, getDimension, getHeight, GetIconLegendHtml, getIconSelector, getIconSelector, getIconSelectorLegend, getIconSelectorLegend, getMapCellStyle, getMaxPushpins, getName, getProperties, getPushpinIconMap, getReplayEnabled, getReplayInterval, getReplaySinglePushpin, getWidth, getZoneDimension, getZoneHeight, getZoneWidth, ID_ZONE_LATITUDE, ID_ZONE_LONGITUDE, isFeatureSupported, setIconSelector, setIconSelectorLegend, setProperties, setProperty, setSupportedFeatures, toString, writeMapUpdate_precheck, writeMapUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoogleMaps

public GoogleMaps(java.lang.String name,
                  java.lang.String key)
Method Detail

getApiVersion

public java.lang.String getApiVersion()
Gets the API version

Returns:
The API version

isVersion2

public boolean isVersion2()
Return true if using Google API v2


isVersion3

public boolean isVersion3()
Return true if using Google API v3


isVersionJS

public boolean isVersionJS()
Return true if using Google API "js"


getMapOptions

public java.lang.String getMapOptions()
Gets the override map options

Returns:
The overriden map options

getMapInitCallback

public java.lang.String getMapInitCallback()
Gets the map initialization callback (may be null)

Returns:
The map initialization callback (may be null)

postInit

public void postInit()
Called after initialization of this MapProvider. This allows the MapProvider to perform any required initialization after all attributes have been set

Overrides:
postInit in class MapProviderAdapter

validate

public boolean validate()
Validates this map provider configuration

Overrides:
validate in class MapProviderAdapter
Returns:
True if the validation checks are successful, false otherwise.

writeMapCell

public void writeMapCell(java.io.PrintWriter out,
                         RequestProperties reqState,
                         MapDimension mapDim)
                  throws java.io.IOException
Writes the map table view to the http output stream

Specified by:
writeMapCell in interface MapProvider
Overrides:
writeMapCell in class MapProviderAdapter
Parameters:
out - The http output stream
reqState - The current session state
mapDim - The specified map dimensions
Throws:
java.io.IOException

writeJSVariables

protected void writeJSVariables(java.io.PrintWriter out,
                                RequestProperties reqState)
                         throws java.io.IOException
Writes mapping support JS to stream

Overrides:
writeJSVariables in class JSMap
Throws:
java.io.IOException

writeJSIncludes

protected void writeJSIncludes(java.io.PrintWriter out,
                               RequestProperties reqState)
                        throws java.io.IOException
Writes the JavaScript required for this map provider

Overrides:
writeJSIncludes in class JSMap
Throws:
java.io.IOException

getGeozoneSupportedPointCount

public int getGeozoneSupportedPointCount(int type)
Returns the number of supported points for the specified Geozone type

Specified by:
getGeozoneSupportedPointCount in interface MapProvider
Overrides:
getGeozoneSupportedPointCount in class MapProviderAdapter
Parameters:
type - The Geozone type
Returns:
The number of supported points for the specified Geozone type

getGeozoneInstructions

public java.lang.String[] getGeozoneInstructions(int type,
                                                 java.util.Locale loc)
Gets the Geozone usage instructions

Specified by:
getGeozoneInstructions in interface MapProvider
Overrides:
getGeozoneInstructions in class MapProviderAdapter
Parameters:
type - The Geozone type
loc - The current Locale
Returns:
The localized instructions