org.opengts.war.maps
Class JSMap

java.lang.Object
  extended by org.opengts.war.tools.MapProviderAdapter
      extended by org.opengts.war.maps.JSMap
All Implemented Interfaces:
MapProvider
Direct Known Subclasses:
ESRIMaps, GoogleMaps, Mapstraction, OpenLayers, VirtualEarth

public class JSMap
extends MapProviderAdapter


Field Summary
static java.lang.String 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
JSMap(java.lang.String name, java.lang.String key)
           
 
Method Summary
protected  boolean _skipPropKey(java.lang.Object key)
          Returns true if the specified key is not to be included in the 'defined propertes' section
 java.lang.String getMapID()
          Returns the 'id' of the html tag block contain the map image
 void writeJavaScript(java.io.PrintWriter out, RequestProperties reqState)
          Writes any required JavaScript to the html stream
protected  void writeJSIncludes(java.io.PrintWriter out, RequestProperties reqState)
           
protected  void writeJSIncludes(java.io.PrintWriter out, RequestProperties reqState, java.lang.String[] jsMapURLs)
           
protected  void writeJSVariables(java.io.PrintWriter out, RequestProperties reqState)
           
 void writeMapUpdate(int mapDataFormat, RequestProperties reqState)
          Writes the events in XML/JSON format to the http output stream.
static void writePushpinArray(java.io.PrintWriter out, RequestProperties reqState)
           
 void writeStyle(java.io.PrintWriter out, RequestProperties reqState)
          Writes any required CSS to the specified PrintWriter.
 
Methods inherited from class org.opengts.war.tools.MapProviderAdapter
_getIconLegendHtml, addSupportedFeature, getAuthorization, getAutoUpdateCount, getAutoUpdateEnabled, getAutoUpdateInterval, getAutoUpdateOnLoad, getCorridorInstructions, getDefaultCenter, getDefaultZoom, getDefaultZoom, getDimension, getGeozoneInstructions, getGeozoneSupportedPointCount, 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, postInit, setIconSelector, setIconSelectorLegend, setProperties, setProperty, setSupportedFeatures, toString, validate, writeMapCell, writeMapUpdate_precheck, writeMapUpdate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MAP_ID

public static final java.lang.String DEFAULT_MAP_ID
See Also:
Constant Field Values
Constructor Detail

JSMap

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

getMapID

public java.lang.String getMapID()
Description copied from class: MapProviderAdapter
Returns the 'id' of the html tag block contain the map image

Specified by:
getMapID in class MapProviderAdapter
Returns:
The html tag block id

_skipPropKey

protected boolean _skipPropKey(java.lang.Object key)
Returns true if the specified key is not to be included in the 'defined propertes' section

Parameters:
key - The property key to test
Returns:
true to omit the specified property from the 'defined properties' section

writeStyle

public void writeStyle(java.io.PrintWriter out,
                       RequestProperties reqState)
                throws java.io.IOException
Description copied from class: MapProviderAdapter
Writes any required CSS to the specified PrintWriter. This method is intended to be overridden to provide the required behavior.

Specified by:
writeStyle in interface MapProvider
Overrides:
writeStyle in class MapProviderAdapter
Parameters:
out - The PrintWriter
reqState - The session RequestProperties
Throws:
java.io.IOException

writeJSVariables

protected void writeJSVariables(java.io.PrintWriter out,
                                RequestProperties reqState)
                         throws java.io.IOException
Throws:
java.io.IOException

writePushpinArray

public static void writePushpinArray(java.io.PrintWriter out,
                                     RequestProperties reqState)
                              throws java.io.IOException
Throws:
java.io.IOException

writeJSIncludes

protected void writeJSIncludes(java.io.PrintWriter out,
                               RequestProperties reqState,
                               java.lang.String[] jsMapURLs)
                        throws java.io.IOException
Throws:
java.io.IOException

writeJSIncludes

protected void writeJSIncludes(java.io.PrintWriter out,
                               RequestProperties reqState)
                        throws java.io.IOException
Throws:
java.io.IOException

writeJavaScript

public void writeJavaScript(java.io.PrintWriter out,
                            RequestProperties reqState)
                     throws java.io.IOException
Description copied from class: MapProviderAdapter
Writes any required JavaScript to the html stream

Specified by:
writeJavaScript in interface MapProvider
Specified by:
writeJavaScript in class MapProviderAdapter
Parameters:
out - The handle to the html output stream
reqState - The current session state
Throws:
java.io.IOException

writeMapUpdate

public void writeMapUpdate(int mapDataFormat,
                           RequestProperties reqState)
                    throws java.io.IOException
Description copied from class: MapProviderAdapter
Writes the events in XML/JSON format to the http output stream. The criteria used for selecting EventData records is specified with the RequestProperties session state.

Specified by:
writeMapUpdate in interface MapProvider
Overrides:
writeMapUpdate in class MapProviderAdapter
reqState - The current session state containing the EventData selection criteria
Throws:
java.io.IOException