Class StandardMapComponent
- java.lang.Object
-
- net.sf.jasperreports.components.map.StandardMapComponent
-
- All Implemented Interfaces:
Serializable
,Cloneable
,MapComponent
,Component
,JRChangeEventsSupport
,JRCloneable
,JREvaluation
public class StandardMapComponent extends Object implements MapComponent, Serializable, JRChangeEventsSupport
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_ADDRESS_EXPRESSION
static String
PROPERTY_EVALUATION_GROUP
static String
PROPERTY_EVALUATION_TIME
static String
PROPERTY_IMAGE_TYPE
static String
PROPERTY_LANGUAGE_EXPRESSION
static String
PROPERTY_LATITUDE_EXPRESSION
static String
PROPERTY_LEGEND
static String
PROPERTY_LONGITUDE_EXPRESSION
static String
PROPERTY_MAP_SCALE
static String
PROPERTY_MAP_TYPE
static String
PROPERTY_MARKER_CLUSTERING
static String
PROPERTY_MARKER_DATA_LIST
static String
PROPERTY_MARKER_SPIDERING
static String
PROPERTY_ON_ERROR_TYPE
static String
PROPERTY_PATH_DATA_LIST
static String
PROPERTY_PATH_STYLE_LIST
static String
PROPERTY_RESET_MAP
static String
PROPERTY_ZOOM_EXPRESSION
-
Fields inherited from interface net.sf.jasperreports.components.map.MapComponent
ATTRIBUTE_IMAGE_TYPE, ATTRIBUTE_MAP_SCALE, ATTRIBUTE_MAP_TYPE, ATTRIBUTE_MARKER_CLUSTERING, ATTRIBUTE_MARKER_SPIDERING, ATTRIBUTE_ON_ERROR_TYPE, DEFAULT_LATITUDE, DEFAULT_LONGITUDE, DEFAULT_MAP_TYPE, DEFAULT_ON_ERROR_TYPE, DEFAULT_PATH_NAME, DEFAULT_ZOOM, ELEMENT_LEGEND_ITEM, ELEMENT_MARKER_DATA, ELEMENT_PATH_DATA, ELEMENT_PATH_STYLE, ELEMENT_RESET_MAP_ITEM, ITEM_PROPERTY_address, ITEM_PROPERTY_clickable, ITEM_PROPERTY_draggable, ITEM_PROPERTY_latitude, ITEM_PROPERTY_longitude, ITEM_PROPERTY_MARKER_color, ITEM_PROPERTY_MARKER_cursor, ITEM_PROPERTY_MARKER_flat, ITEM_PROPERTY_MARKER_icon, ITEM_PROPERTY_MARKER_ICON_ANCHOR_x, ITEM_PROPERTY_MARKER_ICON_ANCHOR_y, ITEM_PROPERTY_MARKER_ICON_height, ITEM_PROPERTY_MARKER_ICON_ORIGIN_x, ITEM_PROPERTY_MARKER_ICON_ORIGIN_y, ITEM_PROPERTY_MARKER_ICON_url, ITEM_PROPERTY_MARKER_ICON_width, ITEM_PROPERTY_MARKER_INFOWINDOW_content, ITEM_PROPERTY_MARKER_INFOWINDOW_latitude, ITEM_PROPERTY_MARKER_INFOWINDOW_longitude, ITEM_PROPERTY_MARKER_INFOWINDOW_maxWidth, ITEM_PROPERTY_MARKER_INFOWINDOW_pixelOffset, ITEM_PROPERTY_MARKER_label, ITEM_PROPERTY_MARKER_optimized, ITEM_PROPERTY_MARKER_raiseOnDrag, ITEM_PROPERTY_MARKER_shadow, ITEM_PROPERTY_MARKER_SHADOW_ANCHOR_x, ITEM_PROPERTY_MARKER_SHADOW_ANCHOR_y, ITEM_PROPERTY_MARKER_SHADOW_height, ITEM_PROPERTY_MARKER_SHADOW_ORIGIN_x, ITEM_PROPERTY_MARKER_SHADOW_ORIGIN_y, ITEM_PROPERTY_MARKER_SHADOW_url, ITEM_PROPERTY_MARKER_SHADOW_width, ITEM_PROPERTY_MARKER_size, ITEM_PROPERTY_MARKER_target, ITEM_PROPERTY_MARKER_title, ITEM_PROPERTY_MARKER_url, ITEM_PROPERTY_MARKER_zIndex, ITEM_PROPERTY_name, ITEM_PROPERTY_style, ITEM_PROPERTY_STYLE_editable, ITEM_PROPERTY_STYLE_fillColor, ITEM_PROPERTY_STYLE_fillOpacity, ITEM_PROPERTY_STYLE_geodesic, ITEM_PROPERTY_STYLE_isPolygon, ITEM_PROPERTY_STYLE_strokeColor, ITEM_PROPERTY_STYLE_strokeOpacity, ITEM_PROPERTY_STYLE_strokeWeight, ITEM_PROPERTY_visible, LEGEND_OR_RESET_MAP_PROPERTY_enabled, LEGEND_OR_RESET_MAP_PROPERTY_label, LEGEND_OR_RESET_MAP_PROPERTY_position, LEGEND_PROPERTY_legendMaxHeight, LEGEND_PROPERTY_legendMaxHeight_fullscreen, LEGEND_PROPERTY_legendMaxWidth, LEGEND_PROPERTY_legendMaxWidth_fullscreen, LEGEND_PROPERTY_orientation, LEGEND_PROPERTY_useMarkerIcons, MAP_ELEMENT_NAME, MAP_ELEMENT_TYPE, PARAMETER_CACHE_RENDERER, PARAMETER_DEFAULT_MARKER_ICON, PARAMETER_LANGUAGE, PARAMETER_LEGEND_PROPERTIES, PARAMETER_MARKERS, PARAMETER_ON_ERROR_TYPE, PARAMETER_PATH_LOCATIONS, PARAMETER_PATHS, PARAMETER_REQ_PARAMS, PARAMETER_RESET_MAP_PROPERTIES, PARAMETER_ZOOM, PROPERTY_CLIENT_ID, PROPERTY_DEFAULT_MARKER_ICON, PROPERTY_GOOGLE_VERSION, PROPERTY_KEY, PROPERTY_PREFIX, PROPERTY_SIGNATURE
-
-
Constructor Summary
Constructors Constructor Description StandardMapComponent()
StandardMapComponent(MapComponent map, JRBaseObjectFactory objectFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addMarkerData(int index, ItemData markerData)
Deprecated.Replaced byaddMarkerItemData(int, MarkerItemData)
.void
addMarkerData(ItemData markerData)
Deprecated.Replaced byaddMarkerItemData(MarkerItemData)
.void
addMarkerItemData(int index, MarkerItemData markerData)
void
addMarkerItemData(MarkerItemData markerItemData)
void
addPathData(int index, ItemData pathData)
void
addPathData(ItemData pathData)
void
addPathStyle(int index, ItemData pathStyle)
void
addPathStyle(ItemData pathStyle)
Object
clone()
JRExpression
getAddressExpression()
Returns aJRExpression
representing the address of the map center.String
getEvaluationGroup()
Gets the evaluation group for this text field.EvaluationTimeEnum
getEvaluationTime()
Gets the evaluation time for this text field.JRPropertyChangeSupport
getEventSupport()
Returns the property change support object for this instance.MapImageTypeEnum
getImageType()
Returns the image format of the map.JRExpression
getLanguageExpression()
Returns aJRExpression
representing the language for the labels on the map.JRExpression
getLatitudeExpression()
Returns aJRExpression
representing the latitude coordinate of the map centerItem
getLegendItem()
JRExpression
getLongitudeExpression()
Returns aJRExpression
representing the longitude coordinate of the map centerMapScaleEnum
getMapScale()
Returns the scale factor of the Google map used to return higher-resolution map images when working with high resolution screens available on mobile devices.MapTypeEnum
getMapType()
Returns the type of the Google map.Boolean
getMarkerClustering()
List<ItemData>
getMarkerDataList()
Deprecated.Replaced bygetMarkerItemDataList()
List<MarkerItemData>
getMarkerItemDataList()
Returns a list ofMarkerItemData
objects representing collections of markers on the mapBoolean
getMarkerSpidering()
OnErrorTypeEnum
getOnErrorType()
Returns an attribute that customizes the way the engine handles a missing map image during report generation.List<ItemData>
getPathDataList()
Returns a list ofItemData
objects representing collections of paths on the mapList<ItemData>
getPathStyleList()
Returns a list ofItemData
objects representing collections of path styles for the mapItem
getResetMapItem()
JRExpression
getZoomExpression()
Returns a numeric expression representing the zoom factor of the map.ItemData
removeMarkerData(ItemData markerData)
Deprecated.Replaced byremoveMarkerItemData(MarkerItemData)
MarkerItemData
removeMarkerItemData(MarkerItemData markerItemData)
ItemData
removePathData(ItemData pathData)
ItemData
removePathStyle(ItemData pathStyle)
void
setAddressExpression(JRExpression addressExpression)
void
setEvaluationGroup(String evaluationGroup)
void
setEvaluationTime(EvaluationTimeEnum evaluationTime)
void
setImageType(MapImageTypeEnum imageType)
void
setLanguageExpression(JRExpression languageExpression)
void
setLatitudeExpression(JRExpression latitudeExpression)
void
setLegend(Item legend)
void
setLongitudeExpression(JRExpression longitudeExpression)
void
setMapScale(MapScaleEnum mapScale)
void
setMapType(MapTypeEnum mapType)
void
setMarkerClustering(Boolean markerClustering)
void
setMarkerSpidering(Boolean markerSpidering)
void
setOnErrorType(OnErrorTypeEnum onErrorType)
void
setResetMap(Item resetMap)
void
setZoomExpression(JRExpression zoomExpression)
-
-
-
Field Detail
-
PROPERTY_LATITUDE_EXPRESSION
public static final String PROPERTY_LATITUDE_EXPRESSION
- See Also:
- Constant Field Values
-
PROPERTY_LONGITUDE_EXPRESSION
public static final String PROPERTY_LONGITUDE_EXPRESSION
- See Also:
- Constant Field Values
-
PROPERTY_ADDRESS_EXPRESSION
public static final String PROPERTY_ADDRESS_EXPRESSION
- See Also:
- Constant Field Values
-
PROPERTY_ZOOM_EXPRESSION
public static final String PROPERTY_ZOOM_EXPRESSION
- See Also:
- Constant Field Values
-
PROPERTY_LANGUAGE_EXPRESSION
public static final String PROPERTY_LANGUAGE_EXPRESSION
- See Also:
- Constant Field Values
-
PROPERTY_EVALUATION_TIME
public static final String PROPERTY_EVALUATION_TIME
- See Also:
- Constant Field Values
-
PROPERTY_EVALUATION_GROUP
public static final String PROPERTY_EVALUATION_GROUP
- See Also:
- Constant Field Values
-
PROPERTY_MAP_TYPE
public static final String PROPERTY_MAP_TYPE
- See Also:
- Constant Field Values
-
PROPERTY_MAP_SCALE
public static final String PROPERTY_MAP_SCALE
- See Also:
- Constant Field Values
-
PROPERTY_IMAGE_TYPE
public static final String PROPERTY_IMAGE_TYPE
- See Also:
- Constant Field Values
-
PROPERTY_ON_ERROR_TYPE
public static final String PROPERTY_ON_ERROR_TYPE
- See Also:
- Constant Field Values
-
PROPERTY_MARKER_CLUSTERING
public static final String PROPERTY_MARKER_CLUSTERING
- See Also:
- Constant Field Values
-
PROPERTY_MARKER_SPIDERING
public static final String PROPERTY_MARKER_SPIDERING
- See Also:
- Constant Field Values
-
PROPERTY_MARKER_DATA_LIST
public static final String PROPERTY_MARKER_DATA_LIST
- See Also:
- Constant Field Values
-
PROPERTY_PATH_STYLE_LIST
public static final String PROPERTY_PATH_STYLE_LIST
- See Also:
- Constant Field Values
-
PROPERTY_PATH_DATA_LIST
public static final String PROPERTY_PATH_DATA_LIST
- See Also:
- Constant Field Values
-
PROPERTY_LEGEND
public static final String PROPERTY_LEGEND
- See Also:
- Constant Field Values
-
PROPERTY_RESET_MAP
public static final String PROPERTY_RESET_MAP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StandardMapComponent
public StandardMapComponent()
-
StandardMapComponent
public StandardMapComponent(MapComponent map, JRBaseObjectFactory objectFactory)
-
-
Method Detail
-
getLatitudeExpression
public JRExpression getLatitudeExpression()
Description copied from interface:MapComponent
Returns aJRExpression
representing the latitude coordinate of the map center- Specified by:
getLatitudeExpression
in interfaceMapComponent
- Returns:
- the latitude expression
-
setLatitudeExpression
public void setLatitudeExpression(JRExpression latitudeExpression)
-
getLongitudeExpression
public JRExpression getLongitudeExpression()
Description copied from interface:MapComponent
Returns aJRExpression
representing the longitude coordinate of the map center- Specified by:
getLongitudeExpression
in interfaceMapComponent
- Returns:
- the longitude expression
-
setLongitudeExpression
public void setLongitudeExpression(JRExpression longitudeExpression)
-
getAddressExpression
public JRExpression getAddressExpression()
Description copied from interface:MapComponent
Returns aJRExpression
representing the address of the map center. If no latitude or longitude coordinates are provided, the address expression will be used to calculate these coordinates- Specified by:
getAddressExpression
in interfaceMapComponent
- Returns:
- the address expression
-
setAddressExpression
public void setAddressExpression(JRExpression addressExpression)
-
getZoomExpression
public JRExpression getZoomExpression()
Description copied from interface:MapComponent
Returns a numeric expression representing the zoom factor of the map.- Specified by:
getZoomExpression
in interfaceMapComponent
- Returns:
- the zoom expression
-
setZoomExpression
public void setZoomExpression(JRExpression zoomExpression)
-
getLanguageExpression
public JRExpression getLanguageExpression()
Description copied from interface:MapComponent
Returns aJRExpression
representing the language for the labels on the map.- Specified by:
getLanguageExpression
in interfaceMapComponent
- Returns:
- the language expression
-
setLanguageExpression
public void setLanguageExpression(JRExpression languageExpression)
-
getEvaluationTime
public EvaluationTimeEnum getEvaluationTime()
Description copied from interface:JREvaluation
Gets the evaluation time for this text field.- Specified by:
getEvaluationTime
in interfaceJREvaluation
- Returns:
- one of the evaluation time constants in
JRExpression
-
setEvaluationTime
public void setEvaluationTime(EvaluationTimeEnum evaluationTime)
-
getEvaluationGroup
public String getEvaluationGroup()
Description copied from interface:JREvaluation
Gets the evaluation group for this text field. Used only when evaluation time is group.- Specified by:
getEvaluationGroup
in interfaceJREvaluation
- See Also:
EvaluationTimeEnum.GROUP
-
setEvaluationGroup
public void setEvaluationGroup(String evaluationGroup)
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-
clone
public Object clone()
- Specified by:
clone
in interfaceJRCloneable
- Overrides:
clone
in classObject
-
getMapType
public MapTypeEnum getMapType()
Description copied from interface:MapComponent
Returns the type of the Google map. Possible values are:- Specified by:
getMapType
in interfaceMapComponent
- Returns:
- the type of the Google map
- See Also:
MapTypeEnum
-
setMapType
public void setMapType(MapTypeEnum mapType)
-
getMapScale
public MapScaleEnum getMapScale()
Description copied from interface:MapComponent
Returns the scale factor of the Google map used to return higher-resolution map images when working with high resolution screens available on mobile devices. Possible values are:1
(default value)2
4
(for Business customers only)
- Specified by:
getMapScale
in interfaceMapComponent
- Returns:
- the scale factor
-
setMapScale
public void setMapScale(MapScaleEnum mapScale)
-
getImageType
public MapImageTypeEnum getImageType()
Description copied from interface:MapComponent
Returns the image format of the map. Possible values are:- Specified by:
getImageType
in interfaceMapComponent
- Returns:
- the image format of the map
- See Also:
MapImageTypeEnum
-
setImageType
public void setImageType(MapImageTypeEnum imageType)
-
getOnErrorType
public OnErrorTypeEnum getOnErrorType()
Description copied from interface:MapComponent
Returns an attribute that customizes the way the engine handles a missing map image during report generation. Possible values are:- Specified by:
getOnErrorType
in interfaceMapComponent
- Returns:
- the onErrorType attribute
- See Also:
OnErrorTypeEnum
-
setOnErrorType
public void setOnErrorType(OnErrorTypeEnum onErrorType)
-
getMarkerClustering
public Boolean getMarkerClustering()
- Specified by:
getMarkerClustering
in interfaceMapComponent
- Returns:
- the
MapComponent.ATTRIBUTE_MARKER_CLUSTERING
attribute
-
setMarkerClustering
public void setMarkerClustering(Boolean markerClustering)
-
getMarkerSpidering
public Boolean getMarkerSpidering()
- Specified by:
getMarkerSpidering
in interfaceMapComponent
- Returns:
- the
MapComponent.ATTRIBUTE_MARKER_SPIDERING
attribute
-
setMarkerSpidering
public void setMarkerSpidering(Boolean markerSpidering)
-
getPathStyleList
public List<ItemData> getPathStyleList()
Description copied from interface:MapComponent
Returns a list ofItemData
objects representing collections of path styles for the map- Specified by:
getPathStyleList
in interfaceMapComponent
- Returns:
- a list of path styles
- See Also:
ItemData
-
addPathStyle
public void addPathStyle(ItemData pathStyle)
-
addPathStyle
public void addPathStyle(int index, ItemData pathStyle)
-
getMarkerDataList
public List<ItemData> getMarkerDataList()
Deprecated.Replaced bygetMarkerItemDataList()
- Specified by:
getMarkerDataList
in interfaceMapComponent
-
getMarkerItemDataList
public List<MarkerItemData> getMarkerItemDataList()
Description copied from interface:MapComponent
Returns a list ofMarkerItemData
objects representing collections of markers on the map- Specified by:
getMarkerItemDataList
in interfaceMapComponent
- Returns:
- a list of marker data
- See Also:
ItemData
-
addMarkerData
public void addMarkerData(ItemData markerData)
Deprecated.Replaced byaddMarkerItemData(MarkerItemData)
.
-
addMarkerItemData
public void addMarkerItemData(MarkerItemData markerItemData)
-
addMarkerData
public void addMarkerData(int index, ItemData markerData)
Deprecated.Replaced byaddMarkerItemData(int, MarkerItemData)
.
-
addMarkerItemData
public void addMarkerItemData(int index, MarkerItemData markerData)
-
removeMarkerData
public ItemData removeMarkerData(ItemData markerData)
Deprecated.Replaced byremoveMarkerItemData(MarkerItemData)
-
removeMarkerItemData
public MarkerItemData removeMarkerItemData(MarkerItemData markerItemData)
-
getLegendItem
public Item getLegendItem()
- Specified by:
getLegendItem
in interfaceMapComponent
-
setLegend
public void setLegend(Item legend)
-
getResetMapItem
public Item getResetMapItem()
- Specified by:
getResetMapItem
in interfaceMapComponent
-
setResetMap
public void setResetMap(Item resetMap)
-
getPathDataList
public List<ItemData> getPathDataList()
Description copied from interface:MapComponent
Returns a list ofItemData
objects representing collections of paths on the map- Specified by:
getPathDataList
in interfaceMapComponent
- Returns:
- a list of path data
- See Also:
ItemData
-
addPathData
public void addPathData(ItemData pathData)
-
addPathData
public void addPathData(int index, ItemData pathData)
-
-