Class ImageMarker
- java.lang.Object
-
- org.openstreetmap.josm.gui.layer.markerlayer.Marker
-
- org.openstreetmap.josm.gui.layer.markerlayer.ButtonMarker
-
- org.openstreetmap.josm.gui.layer.markerlayer.ImageMarker
-
- All Implemented Interfaces:
ILatLon
,Destroyable
,TemplateEngineDataProvider
public class ImageMarker extends ButtonMarker
Marker representing an image. Uses a special icon, and when clicked, displays an image view dialog. Re-uses some code from GeoImageLayer.
-
-
Field Summary
Fields Modifier and Type Field Description URL
imageUrl
-
Fields inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker
LABEL_PATTERN_AUTO, LABEL_PATTERN_DESC, LABEL_PATTERN_NAME, MARKER_FORMATTED_OFFSET, MARKER_OFFSET, offset, parentLayer, symbol, time
-
-
Constructor Summary
Constructors Constructor Description ImageMarker(LatLon ll, URL imageUrl, MarkerLayer parentLayer, double time, double offset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(ActionEvent ev)
Called when the mouse is clicked in the marker's hotspot.WayPoint
convertToWayPoint()
Convert Marker to WayPoint so it can be exported to a GPX file.private static Icon
loadScaledImage(URL u, int maxSize)
-
Methods inherited from class org.openstreetmap.josm.gui.layer.markerlayer.ButtonMarker
containsPoint, paint
-
Methods inherited from class org.openstreetmap.josm.gui.layer.markerlayer.Marker
appendMarkerProducer, createMarkers, destroy, evaluateCondition, getCoor, getTemplateKeys, getTemplateValue, getText, getTextTemplateKey, isErroneous, lat, lon, paintIcon, prependMarkerProducer, setCoor, setEastNorth, setErroneous, updateText
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.coor.ILatLon
getEastNorth, isLatLonKnown
-
-
-
-
Constructor Detail
-
ImageMarker
public ImageMarker(LatLon ll, URL imageUrl, MarkerLayer parentLayer, double time, double offset)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(ActionEvent ev)
Description copied from class:Marker
Called when the mouse is clicked in the marker's hotspot. Never called for markers which always return false from containsPoint.- Overrides:
actionPerformed
in classMarker
- Parameters:
ev
- A dummy ActionEvent
-
loadScaledImage
private static Icon loadScaledImage(URL u, int maxSize)
-
convertToWayPoint
public WayPoint convertToWayPoint()
Description copied from class:Marker
Convert Marker to WayPoint so it can be exported to a GPX file. Override in subclasses to add all necessary attributes.- Overrides:
convertToWayPoint
in classMarker
- Returns:
- the corresponding WayPoint with all relevant attributes
-
-