new InfoWindow()
Base class for infoWindows. This acts as an abstract class so that infoWindows for both Google and OpenLayers can be interacted with seamlessly by the overlying logic. Please do not call this constructor directly. Always use createInstance rather than instantiating this class directly. Using createInstance allows this class to be externally extensible.
Methods
-
<static> createInstance(options)
-
Creates an instance of an InfoWindow, please always use this function rather than calling the constructor directly
Parameters:
Name Type Description options
object Options for the object (optional) -
<static> getConstructor()
-
Fetches the constructor to be used by createInstance, based on the selected maps engine
Returns:
The appropriate constructor- Type
- function
-
close()
-
Abstract function, closes this InfoWindow
-
getContent()
-
Gets the content for the info window and passes it to the specified callback - this allows for delayed loading (eg AJAX) as well as instant content
Returns:
void -
onMapObjectAdded()
-
Event listener for when the map object is added. This will cause the info window to open if the map object has infoopen set
Returns:
void -
open(map, mapObject)
-
Opens the info window on the specified map, with the specified map object as the subject.
Parameters:
Name Type Description map
WPGMZA.Map The map to open this InfoWindow on. mapObject
WPGMZA.MapObject The map object (eg marker, polygon) to open this InfoWindow on. Returns:
boolean FALSE if the info window should not and will not open, TRUE if it will. This can be used by subclasses to establish whether or not the subclassed open should bail or open the window. -
setContent()
-
Abstract function, sets the content in this InfoWindow
-
setOptions()
-
Abstract function, sets options on this InfoWindow