OpenLayers JavaScript Mapping Library |
OpenLayers. FeatureFeatures are combinations of geography and attributes. The OpenLayers.Feature class specifically combines a marker and a lonlat. Summary
popupClass{OpenLayers.Class} The class which will be used to instantiate a new Popup. Default is OpenLayers.Popup.AnchoredBubble. OpenLayers. FeatureConstructor for features. Parameters
ReturnscreateMarker
Based on the data associated with the Feature, create and return a marker object. Returns{OpenLayers.Marker} A Marker Object created from the ‘lonlat’ and ‘icon’ properties set in this.data. If no ‘lonlat’ is set, returns null. If no ‘icon’ is set, OpenLayers.Marker() will load the default image.
createPopup
Creates a popup object created from the ‘lonlat’, ‘popupSize’, and ‘popupContentHTML’ properties set in this.data. It uses this.marker.icon as default anchor. If no ‘lonlat’ is set, returns null. If no this.marker has been created, no anchor is sent.
Parameters
Returns{OpenLayers.Popup} Returns the created popup, which is also set as ‘popup’ property of this feature. Will be of whatever type specified by this feature’s ‘popupClass’ property, but must be of type OpenLayers.Popup. |
nullify references to prevent circular references and memory leaks
destroy: function()
{Boolean} Whether or not the feature is currently visible on screen (based on its ‘lonlat’ property)
onScreen:function()
Based on the data associated with the Feature, create and return a marker object.
createMarker: function()
Destroys marker.
destroyMarker: function()
Creates a popup object created from the ‘lonlat’, ‘popupSize’, and ‘popupContentHTML’ properties set in this.data.
createPopup: function( closeBox )
Destroys the popup created via createPopup.
destroyPopup: function()