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 StringPROPERTY_ADDRESS_EXPRESSIONstatic StringPROPERTY_EVALUATION_GROUPstatic StringPROPERTY_EVALUATION_TIMEstatic StringPROPERTY_IMAGE_TYPEstatic StringPROPERTY_LANGUAGE_EXPRESSIONstatic StringPROPERTY_LATITUDE_EXPRESSIONstatic StringPROPERTY_LEGENDstatic StringPROPERTY_LONGITUDE_EXPRESSIONstatic StringPROPERTY_MAP_SCALEstatic StringPROPERTY_MAP_TYPEstatic StringPROPERTY_MARKER_CLUSTERINGstatic StringPROPERTY_MARKER_DATA_LISTstatic StringPROPERTY_MARKER_SPIDERINGstatic StringPROPERTY_ON_ERROR_TYPEstatic StringPROPERTY_PATH_DATA_LISTstatic StringPROPERTY_PATH_STYLE_LISTstatic StringPROPERTY_RESET_MAPstatic StringPROPERTY_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 voidaddMarkerData(int index, ItemData markerData)Deprecated.Replaced byaddMarkerItemData(int, MarkerItemData).voidaddMarkerData(ItemData markerData)Deprecated.Replaced byaddMarkerItemData(MarkerItemData).voidaddMarkerItemData(int index, MarkerItemData markerData)voidaddMarkerItemData(MarkerItemData markerItemData)voidaddPathData(int index, ItemData pathData)voidaddPathData(ItemData pathData)voidaddPathStyle(int index, ItemData pathStyle)voidaddPathStyle(ItemData pathStyle)Objectclone()JRExpressiongetAddressExpression()Returns aJRExpressionrepresenting the address of the map center.StringgetEvaluationGroup()Gets the evaluation group for this text field.EvaluationTimeEnumgetEvaluationTime()Gets the evaluation time for this text field.JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.MapImageTypeEnumgetImageType()Returns the image format of the map.JRExpressiongetLanguageExpression()Returns aJRExpressionrepresenting the language for the labels on the map.JRExpressiongetLatitudeExpression()Returns aJRExpressionrepresenting the latitude coordinate of the map centerItemgetLegendItem()JRExpressiongetLongitudeExpression()Returns aJRExpressionrepresenting the longitude coordinate of the map centerMapScaleEnumgetMapScale()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.MapTypeEnumgetMapType()Returns the type of the Google map.BooleangetMarkerClustering()List<ItemData>getMarkerDataList()Deprecated.Replaced bygetMarkerItemDataList()List<MarkerItemData>getMarkerItemDataList()Returns a list ofMarkerItemDataobjects representing collections of markers on the mapBooleangetMarkerSpidering()OnErrorTypeEnumgetOnErrorType()Returns an attribute that customizes the way the engine handles a missing map image during report generation.List<ItemData>getPathDataList()Returns a list ofItemDataobjects representing collections of paths on the mapList<ItemData>getPathStyleList()Returns a list ofItemDataobjects representing collections of path styles for the mapItemgetResetMapItem()JRExpressiongetZoomExpression()Returns a numeric expression representing the zoom factor of the map.ItemDataremoveMarkerData(ItemData markerData)Deprecated.Replaced byremoveMarkerItemData(MarkerItemData)MarkerItemDataremoveMarkerItemData(MarkerItemData markerItemData)ItemDataremovePathData(ItemData pathData)ItemDataremovePathStyle(ItemData pathStyle)voidsetAddressExpression(JRExpression addressExpression)voidsetEvaluationGroup(String evaluationGroup)voidsetEvaluationTime(EvaluationTimeEnum evaluationTime)voidsetImageType(MapImageTypeEnum imageType)voidsetLanguageExpression(JRExpression languageExpression)voidsetLatitudeExpression(JRExpression latitudeExpression)voidsetLegend(Item legend)voidsetLongitudeExpression(JRExpression longitudeExpression)voidsetMapScale(MapScaleEnum mapScale)voidsetMapType(MapTypeEnum mapType)voidsetMarkerClustering(Boolean markerClustering)voidsetMarkerSpidering(Boolean markerSpidering)voidsetOnErrorType(OnErrorTypeEnum onErrorType)voidsetResetMap(Item resetMap)voidsetZoomExpression(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:MapComponentReturns aJRExpressionrepresenting the latitude coordinate of the map center- Specified by:
getLatitudeExpressionin interfaceMapComponent- Returns:
- the latitude expression
-
setLatitudeExpression
public void setLatitudeExpression(JRExpression latitudeExpression)
-
getLongitudeExpression
public JRExpression getLongitudeExpression()
Description copied from interface:MapComponentReturns aJRExpressionrepresenting the longitude coordinate of the map center- Specified by:
getLongitudeExpressionin interfaceMapComponent- Returns:
- the longitude expression
-
setLongitudeExpression
public void setLongitudeExpression(JRExpression longitudeExpression)
-
getAddressExpression
public JRExpression getAddressExpression()
Description copied from interface:MapComponentReturns aJRExpressionrepresenting 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:
getAddressExpressionin interfaceMapComponent- Returns:
- the address expression
-
setAddressExpression
public void setAddressExpression(JRExpression addressExpression)
-
getZoomExpression
public JRExpression getZoomExpression()
Description copied from interface:MapComponentReturns a numeric expression representing the zoom factor of the map.- Specified by:
getZoomExpressionin interfaceMapComponent- Returns:
- the zoom expression
-
setZoomExpression
public void setZoomExpression(JRExpression zoomExpression)
-
getLanguageExpression
public JRExpression getLanguageExpression()
Description copied from interface:MapComponentReturns aJRExpressionrepresenting the language for the labels on the map.- Specified by:
getLanguageExpressionin interfaceMapComponent- Returns:
- the language expression
-
setLanguageExpression
public void setLanguageExpression(JRExpression languageExpression)
-
getEvaluationTime
public EvaluationTimeEnum getEvaluationTime()
Description copied from interface:JREvaluationGets the evaluation time for this text field.- Specified by:
getEvaluationTimein interfaceJREvaluation- Returns:
- one of the evaluation time constants in
JRExpression
-
setEvaluationTime
public void setEvaluationTime(EvaluationTimeEnum evaluationTime)
-
getEvaluationGroup
public String getEvaluationGroup()
Description copied from interface:JREvaluationGets the evaluation group for this text field. Used only when evaluation time is group.- Specified by:
getEvaluationGroupin interfaceJREvaluation- See Also:
EvaluationTimeEnum.GROUP
-
setEvaluationGroup
public void setEvaluationGroup(String evaluationGroup)
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
clone
public Object clone()
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classObject
-
getMapType
public MapTypeEnum getMapType()
Description copied from interface:MapComponentReturns the type of the Google map. Possible values are:- Specified by:
getMapTypein 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:MapComponentReturns 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)24(for Business customers only)
- Specified by:
getMapScalein interfaceMapComponent- Returns:
- the scale factor
-
setMapScale
public void setMapScale(MapScaleEnum mapScale)
-
getImageType
public MapImageTypeEnum getImageType()
Description copied from interface:MapComponentReturns the image format of the map. Possible values are:- Specified by:
getImageTypein 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:MapComponentReturns an attribute that customizes the way the engine handles a missing map image during report generation. Possible values are:- Specified by:
getOnErrorTypein interfaceMapComponent- Returns:
- the onErrorType attribute
- See Also:
OnErrorTypeEnum
-
setOnErrorType
public void setOnErrorType(OnErrorTypeEnum onErrorType)
-
getMarkerClustering
public Boolean getMarkerClustering()
- Specified by:
getMarkerClusteringin interfaceMapComponent- Returns:
- the
MapComponent.ATTRIBUTE_MARKER_CLUSTERINGattribute
-
setMarkerClustering
public void setMarkerClustering(Boolean markerClustering)
-
getMarkerSpidering
public Boolean getMarkerSpidering()
- Specified by:
getMarkerSpideringin interfaceMapComponent- Returns:
- the
MapComponent.ATTRIBUTE_MARKER_SPIDERINGattribute
-
setMarkerSpidering
public void setMarkerSpidering(Boolean markerSpidering)
-
getPathStyleList
public List<ItemData> getPathStyleList()
Description copied from interface:MapComponentReturns a list ofItemDataobjects representing collections of path styles for the map- Specified by:
getPathStyleListin 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:
getMarkerDataListin interfaceMapComponent
-
getMarkerItemDataList
public List<MarkerItemData> getMarkerItemDataList()
Description copied from interface:MapComponentReturns a list ofMarkerItemDataobjects representing collections of markers on the map- Specified by:
getMarkerItemDataListin 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:
getLegendItemin interfaceMapComponent
-
setLegend
public void setLegend(Item legend)
-
getResetMapItem
public Item getResetMapItem()
- Specified by:
getResetMapItemin interfaceMapComponent
-
setResetMap
public void setResetMap(Item resetMap)
-
getPathDataList
public List<ItemData> getPathDataList()
Description copied from interface:MapComponentReturns a list ofItemDataobjects representing collections of paths on the map- Specified by:
getPathDataListin interfaceMapComponent- Returns:
- a list of path data
- See Also:
ItemData
-
addPathData
public void addPathData(ItemData pathData)
-
addPathData
public void addPathData(int index, ItemData pathData)
-
-