Package | com.google.maps |
Class | public class InfoWindowOptions |
Property | Defined by | ||
---|---|---|---|
content : String
Plain text content for the info window.
| InfoWindowOptions | ||
contentFormat : TextFormat
Info window's content format.
| InfoWindowOptions | ||
contentHTML : String
HTML content for the info window.
| InfoWindowOptions | ||
contentStyleSheet : StyleSheet
Info window's content style sheet.
| InfoWindowOptions | ||
cornerRadius : Object
A Number value that indicates the info window's corner radius.
| InfoWindowOptions | ||
customCloseRect : Rectangle
Custom close rectangle.
| InfoWindowOptions | ||
customContent : DisplayObject
Display object used as the info window's custom content.
| InfoWindowOptions | ||
customOffset : Point
Custom content offset.
| InfoWindowOptions | ||
drawDefaultFrame : Object
A Boolean value indicating whether the default infowindow outline
(including the default close button) should be drawn around the
custom content specified through the customContent property.
| InfoWindowOptions | ||
fillStyle : FillStyle
Info window's fill style.
| InfoWindowOptions | ||
hasCloseButton : Object
A Boolean value that indicates whether the info window has a close button.
| InfoWindowOptions | ||
hasShadow : Object
A Boolean value that indicates whether the info window has a shadow.
| InfoWindowOptions | ||
hasTail : Object
A Boolean value that indicates whether the info window has a tail.
| InfoWindowOptions | ||
height : Object
A Number value that indicates the info window's height.
| InfoWindowOptions | ||
padding : Object
A Number value that indicates the padding applied around the info window's
title and content.
| InfoWindowOptions | ||
pointOffset : Point
Offset of the tail point from the info window anchor.
| InfoWindowOptions | ||
strokeStyle : StrokeStyle
Info window's stroke style.
| InfoWindowOptions | ||
tailAlign : Object
A Number value that specifies the tail alignment.
| InfoWindowOptions | ||
tailHeight : Object
A Number value that indicates the tail's height.
| InfoWindowOptions | ||
tailOffset : Object
A Number value that indicates the horizontal offset of the tail's tip
from the info window midpoint.
| InfoWindowOptions | ||
tailWidth : Object
A Number value that indicates the tail's width.
| InfoWindowOptions | ||
title : String
Plain text title for the info window.
| InfoWindowOptions | ||
titleFormat : TextFormat
Info window's title format.
| InfoWindowOptions | ||
titleHTML : String
HTML title for the info window.
| InfoWindowOptions | ||
titleStyleSheet : StyleSheet
Info window's title style sheet.
| InfoWindowOptions | ||
width : Object
A Number value that indicates the info window's width.
| InfoWindowOptions |
Method | Defined by | ||
---|---|---|---|
InfoWindowOptions(param:Object = null)
Constructs an InfoWindowOptions object, optionally initializing it from
an object.
| InfoWindowOptions | ||
[static]
Retrieves the InfoWindowOptions instance that represents the default set of
options that applies to all info windows.
| InfoWindowOptions | ||
setDefaultOptions(defaults:InfoWindowOptions):void
[static]
Sets the default set of options that applies to all infowindows.
| InfoWindowOptions | ||
toString():String
Returns a String representation of this object.
| InfoWindowOptions |
Constant | Defined by | ||
---|---|---|---|
ALIGN_CENTER : Number = 1 [static]
| InfoWindowOptions | ||
ALIGN_LEFT : Number = 0 [static]
| InfoWindowOptions | ||
ALIGN_RIGHT : Number = 2 [static]
| InfoWindowOptions |
content | property |
content:String
[read-write]Plain text content for the info window.
Implementation public function get content():String
public function set content(value:String):void
contentFormat | property |
contentFormat:TextFormat
[read-write]Info window's content format.
Implementation public function get contentFormat():TextFormat
public function set contentFormat(value:TextFormat):void
contentHTML | property |
contentHTML:String
[read-write]HTML content for the info window.
Implementation public function get contentHTML():String
public function set contentHTML(value:String):void
contentStyleSheet | property |
contentStyleSheet:StyleSheet
[read-write]Info window's content style sheet.
Implementation public function get contentStyleSheet():StyleSheet
public function set contentStyleSheet(value:StyleSheet):void
cornerRadius | property |
cornerRadius:Object
[read-write]A Number value that indicates the info window's corner radius.
Implementation public function get cornerRadius():Object
public function set cornerRadius(value:Object):void
customCloseRect | property |
customCloseRect:Rectangle
[read-write]Custom close rectangle. If non-null, this parameter specifies the rectangular region within which a mouse-click will close the info window. When the customContent property is also non-null this region is invisible but still active. When using custom content you are, of course, free to attach mouse listeners within your own content and could use one of these to close the info window; this property provides an alternative. When the customContent property is null the customCloseRect property can be used to move the close button from its default location.
Implementation public function get customCloseRect():Rectangle
public function set customCloseRect(value:Rectangle):void
See also
customContent | property |
customContent:DisplayObject
[read-write]Display object used as the info window's custom content. If this field is not null then nothing is drawn by the Maps API for Flash library, but rather the custom content is positioned relative to the info window anchor point.
Implementation public function get customContent():DisplayObject
public function set customContent(value:DisplayObject):void
See also
// Add the info window's content as a resource. [Embed(source="mycustominfowindow.png")] private var MyCustomInfoWindowImage:Class; // Set the custom content and place it so that its origin is positioned // at a point 20 pixels to the left of, and 10 pixels above, the info // window's anchor. var options:InfoWindowOptions = new InfoWindowOptions(); options.customContent = new MyCustomInfoWindowImage(); options.drawDefaultFrame = false; options.customOffset = new Point(-20, -10); // Open the info window. myMap.openInfoWindow(new LatLng(23, 34), options);
customOffset | property |
customOffset:Point
[read-write]Custom content offset. When custom content is used, this parameter specifies the offset of the infowindow's target location in relation to the customContent's alignment point. This property has no effect if customContent is not specified or if drawDefaultFrame is set to true.
Implementation public function get customOffset():Point
public function set customOffset(value:Point):void
See also
drawDefaultFrame | property |
drawDefaultFrame:Object
[read-write]A Boolean value indicating whether the default infowindow outline (including the default close button) should be drawn around the custom content specified through the customContent property. The default infowindow outline is always drawn if the custom content is not specified.
Implementation public function get drawDefaultFrame():Object
public function set drawDefaultFrame(value:Object):void
See also
fillStyle | property |
fillStyle:FillStyle
[read-write]Info window's fill style.
Implementation public function get fillStyle():FillStyle
public function set fillStyle(value:FillStyle):void
hasCloseButton | property |
hasCloseButton:Object
[read-write]A Boolean value that indicates whether the info window has a close button.
Implementation public function get hasCloseButton():Object
public function set hasCloseButton(value:Object):void
hasShadow | property |
hasShadow:Object
[read-write]A Boolean value that indicates whether the info window has a shadow.
Implementation public function get hasShadow():Object
public function set hasShadow(value:Object):void
hasTail | property |
hasTail:Object
[read-write]A Boolean value that indicates whether the info window has a tail.
Implementation public function get hasTail():Object
public function set hasTail(value:Object):void
height | property |
height:Object
[read-write]A Number value that indicates the info window's height.
Implementation public function get height():Object
public function set height(value:Object):void
padding | property |
padding:Object
[read-write]A Number value that indicates the padding applied around the info window's title and content.
Implementation public function get padding():Object
public function set padding(value:Object):void
pointOffset | property |
pointOffset:Point
[read-write]Offset of the tail point from the info window anchor. This parameter may be used to create the effect of infowindow "floating above the ground" (for negative values of pointOffset.y) instead of touching its latLng location on the map.
Implementation public function get pointOffset():Point
public function set pointOffset(value:Point):void
strokeStyle | property |
strokeStyle:StrokeStyle
[read-write]Info window's stroke style.
Implementation public function get strokeStyle():StrokeStyle
public function set strokeStyle(value:StrokeStyle):void
tailAlign | property |
tailAlign:Object
[read-write]A Number value that specifies the tail alignment. Set this to one of the constants InfoWindowOptions.ALIGN_LEFT, InfoWindowOptions.ALIGN_CENTER or InfoWindowOptions.ALIGN_RIGHT.
Implementation public function get tailAlign():Object
public function set tailAlign(value:Object):void
tailHeight | property |
tailHeight:Object
[read-write]A Number value that indicates the tail's height.
Implementation public function get tailHeight():Object
public function set tailHeight(value:Object):void
tailOffset | property |
tailOffset:Object
[read-write]A Number value that indicates the horizontal offset of the tail's tip from the info window midpoint.
Implementation public function get tailOffset():Object
public function set tailOffset(value:Object):void
tailWidth | property |
tailWidth:Object
[read-write]A Number value that indicates the tail's width.
Implementation public function get tailWidth():Object
public function set tailWidth(value:Object):void
title | property |
title:String
[read-write]Plain text title for the info window.
Implementation public function get title():String
public function set title(value:String):void
titleFormat | property |
titleFormat:TextFormat
[read-write]Info window's title format.
Implementation public function get titleFormat():TextFormat
public function set titleFormat(value:TextFormat):void
titleHTML | property |
titleHTML:String
[read-write]HTML title for the info window.
Implementation public function get titleHTML():String
public function set titleHTML(value:String):void
titleStyleSheet | property |
titleStyleSheet:StyleSheet
[read-write]Info window's title style sheet.
Implementation public function get titleStyleSheet():StyleSheet
public function set titleStyleSheet(value:StyleSheet):void
width | property |
width:Object
[read-write]A Number value that indicates the info window's width.
Implementation public function get width():Object
public function set width(value:Object):void
InfoWindowOptions | () | constructor |
public function InfoWindowOptions(param:Object = null)
Constructs an InfoWindowOptions object, optionally initializing it from an object.
Parametersparam:Object (default = null ) — An object that contains a set of initial
values for the new InfoWindowOptions object.
The fields are:
strokeStyle:StrokeStyle
fillStyle:FillStyle
title:String
titleHTML:String
titleFormat:TextFormat
titleStyleSheet:StyleSheet
content:String
contentHTML:String
contentFormat:TextFormat
contentStyleSheet:StyleSheet
width:Object
height:Object
cornerRadius:Object
padding:Object
hasCloseButton:Object
hasTail:Object
tailWidth:Object
tailHeight:Object
tailOffset:Object
tailAlign:Object
pointOffset:Point
hasShadow:Object
|
See also
var titleFormat:TextFormat = new TextFormat(); textFormat.bold = true; var titleStyleSheet:StyleSheet = new StyleSheet(); var h1:Object = { color: "#FFFF80", fontWeight: "bold" }; titleStyleSheet.setStyle("h1", h1); var contentStyleSheet:StyleSheet = new StyleSheet(); var body:Object = { color: "#FF0080", fontStyle: "italic" }; contentStyleSheet.setStyle("body", body); var contentFormat:TextFormat = new TextFormat("Arial", 10); var options:InfoWindowOptions = new InfoWindowOptions({ strokeStyle: { color: 0x987654 }, fillStyle: { color: 0x223344, alpha: 0.8 }, titleFormat: titleFormat, titleStyleSheet: titleStyleSheet, contentFormat: contentFormat, contentStyleSheet: contentStyleSheet, width: 200, cornerRadius: 12, padding: 10, hasCloseButton: true, hasTail: true, tailWidth: 20, tailHeight: 30, tailOffset: -12, tailAlign: InfoWindowOptions.ALIGN_LEFT, pointOffset: new Point(3, 8), hasShadow: true });
getDefaultOptions | () | method |
public static function getDefaultOptions():InfoWindowOptions
Retrieves the InfoWindowOptions instance that represents the default set of options that applies to all info windows.
// Initialization object corresponding to the initial defaults. var titleStyleSheet:StyleSheet = new StyleSheet(); titleStyleSheet.setStyle("p", { fontFamily: "_sans" }); var contentStyleSheet:StyleSheet = new StyleSheet(); contentStyleSheet.setStyle("p", { fontFamily: "_sans" }); var initObject:Object = { strokeStyle: { thickness: 2, alpha: 1.0, color:Color.BLACK }, fillStyle: { color: 0xffffff, alpha: 1.0 }, title: null, titleHTML: null, titleFormat: new TextFormat("_sans"), titleStyleSheet: titleStyleSheet, content: null, contentHTML: null, contentFormat: new TextFormat("_sans"), contentStyleSheet: contentStyleSheet, width: 200, height: null, cornerRadius: 5, padding: 0, hasCloseButton: true, hasTail: true, tailWidth: 20, tailHeight: 20, tailOffset: 0, tailAlign: InfoWindowOptions.ALIGN_LEFT, pointOffset: new Point(0, 0), hasShadow: true, customContent: null, customOffset: null, customCloseRect: null }
InfoWindowOptions —
Default info window options.
|
setDefaultOptions | () | method |
public static function setDefaultOptions(defaults:InfoWindowOptions):void
Sets the default set of options that applies to all infowindows.
Options may also be set for the infowindow individually in the
openInfoWindow call.
If that is the case, options specified in that call
will take precedence over the default options.
The defaults
parameter may specify a complete or partial set
of infowindow options. If a partial set of options is specified, it will
supplement the existing defaults, overriding only the values that were
set explicitly and leaving the rest unchanged.
defaults:InfoWindowOptions — New default full or partial set of infowindow options.
|
toString | () | method |
public function toString():String
Returns a String representation of this object.
ReturnsString — String representation of this object.
|
ALIGN_CENTER | constant |
public static const ALIGN_CENTER:Number = 1
ALIGN_LEFT | constant |
public static const ALIGN_LEFT:Number = 0
ALIGN_RIGHT | constant |
public static const ALIGN_RIGHT:Number = 2