org.opengts.war.maps.jsmap
Class Mapstraction

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

public class Mapstraction
extends JSMap


Field Summary
static java.lang.String DEFAULT_PROVIDER
           
static java.lang.String[] PROP_LOCAL_JS
           
static java.lang.String[] PROP_provider
           
static java.lang.String PROVIDER_CLOUDMADE
           
static java.lang.String PROVIDER_ESRI
           
static java.lang.String PROVIDER_FREEEARTH
           
static java.lang.String PROVIDER_GOOGLE
           
static java.lang.String PROVIDER_GOOGLEV3
           
static java.lang.String PROVIDER_LEAFLET
           
static java.lang.String PROVIDER_MAP24
           
static java.lang.String PROVIDER_MAPQUEST
           
static java.lang.String PROVIDER_MICROSOFT
           
static java.lang.String PROVIDER_MICROSOFT7
           
static java.lang.String PROVIDER_MULTIMAP
           
static java.lang.String PROVIDER_OPENLAYERS
           
static java.lang.String PROVIDER_OPENMQ
           
static java.lang.String PROVIDER_OPENSPACE
           
static java.lang.String PROVIDER_OPENSTREETMAP
           
static java.lang.String PROVIDER_OVI
           
static java.lang.String PROVIDER_YAHOO
           
 
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
Mapstraction(java.lang.String name, java.lang.String key)
           
 
Method Summary
protected  java.lang.String _getAuthKey(java.lang.String provider, java.lang.String dftKey)
           
 java.lang.String getApiVersion()
          Gets the API version
 java.lang.String[] getGeozoneInstructions(int type, java.util.Locale loc)
          Returns instructions for manipulating a Geozone
 boolean isFeatureSupported(long feature)
          Returns true if the specified map feature is supported
 boolean isVersion1()
          Return true if using Mapstraction API v1
 boolean isVersion2()
          Return true if using Google API v3
protected  void writeJSIncludes(java.io.PrintWriter out, RequestProperties reqState)
           
protected  void writeJSVariables(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.maps.JSMap
_skipPropKey, getMapID, writeJavaScript, writeJSIncludes, writeMapUpdate, writePushpinArray
 
Methods inherited from class org.opengts.war.tools.MapProviderAdapter
_getIconLegendHtml, addSupportedFeature, getAuthorization, getAutoUpdateCount, getAutoUpdateEnabled, getAutoUpdateInterval, getAutoUpdateOnLoad, getCorridorInstructions, getDefaultCenter, getDefaultZoom, getDefaultZoom, getDimension, 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, 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

PROVIDER_OPENLAYERS

public static final java.lang.String PROVIDER_OPENLAYERS
See Also:
Constant Field Values

PROVIDER_GOOGLEV3

public static final java.lang.String PROVIDER_GOOGLEV3
See Also:
Constant Field Values

PROVIDER_CLOUDMADE

public static final java.lang.String PROVIDER_CLOUDMADE
See Also:
Constant Field Values

PROVIDER_MICROSOFT

public static final java.lang.String PROVIDER_MICROSOFT
See Also:
Constant Field Values

PROVIDER_MICROSOFT7

public static final java.lang.String PROVIDER_MICROSOFT7
See Also:
Constant Field Values

PROVIDER_MAPQUEST

public static final java.lang.String PROVIDER_MAPQUEST
See Also:
Constant Field Values

PROVIDER_OPENMQ

public static final java.lang.String PROVIDER_OPENMQ
See Also:
Constant Field Values

PROVIDER_ESRI

public static final java.lang.String PROVIDER_ESRI
See Also:
Constant Field Values

PROVIDER_OPENSPACE

public static final java.lang.String PROVIDER_OPENSPACE
See Also:
Constant Field Values

PROVIDER_LEAFLET

public static final java.lang.String PROVIDER_LEAFLET
See Also:
Constant Field Values

PROVIDER_OVI

public static final java.lang.String PROVIDER_OVI
See Also:
Constant Field Values

PROVIDER_GOOGLE

public static final java.lang.String PROVIDER_GOOGLE
See Also:
Constant Field Values

PROVIDER_YAHOO

public static final java.lang.String PROVIDER_YAHOO
See Also:
Constant Field Values

PROVIDER_MULTIMAP

public static final java.lang.String PROVIDER_MULTIMAP
See Also:
Constant Field Values

PROVIDER_MAP24

public static final java.lang.String PROVIDER_MAP24
See Also:
Constant Field Values

PROVIDER_OPENSTREETMAP

public static final java.lang.String PROVIDER_OPENSTREETMAP
See Also:
Constant Field Values

PROVIDER_FREEEARTH

public static final java.lang.String PROVIDER_FREEEARTH
See Also:
Constant Field Values

DEFAULT_PROVIDER

public static final java.lang.String DEFAULT_PROVIDER
See Also:
Constant Field Values

PROP_provider

public static final java.lang.String[] PROP_provider

PROP_LOCAL_JS

public static final java.lang.String[] PROP_LOCAL_JS
Constructor Detail

Mapstraction

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

getApiVersion

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

Returns:
The API version

isVersion1

public boolean isVersion1()
Return true if using Mapstraction API v1


isVersion2

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


isFeatureSupported

public boolean isFeatureSupported(long feature)
Description copied from class: MapProviderAdapter
Returns true if the specified map feature is supported

Specified by:
isFeatureSupported in interface MapProvider
Overrides:
isFeatureSupported in class MapProviderAdapter
Parameters:
feature - The feature tested for support
Returns:
True if the specified feature is supported

writeJSVariables

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

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 JSMap
Parameters:
out - The PrintWriter
reqState - The session RequestProperties
Throws:
java.io.IOException

_getAuthKey

protected java.lang.String _getAuthKey(java.lang.String provider,
                                       java.lang.String dftKey)

writeJSIncludes

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

getGeozoneInstructions

public java.lang.String[] getGeozoneInstructions(int type,
                                                 java.util.Locale loc)
Description copied from class: MapProviderAdapter
Returns instructions for manipulating a Geozone

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