
InfoBubbleMethod
Description
Creates an infoBubble according to the parameters required and return it to a callback function.
Parameters
| Type | Name | Description |
|---|---|---|
| Object | data | Data object containing the data for display in the infoBubble |
| String | name | Data for the title |
| String | description | Data for the second line of text. Frequently an address |
| String | more | Data for the third line of text. |
| Number | ratingValue | Number of rating stars to be shown . values: [0.0, 0.5, 1.0, ... , 4.5, 5.0] |
| Object | params | params of the infoBubble to create |
| Array | content | List of "children" elements which are to be shown in the infoBubble (if data is present) possible values are ["title", "description", "more", "rating"] |
| Number | maxWidth | If not given, the bubble will be as big as it needs to be. If given, the maximum width of the bubble. It will always be as small as possible, though |
| String | Image | left | A string which can resolve to the src of an image. Or a javascript image element |
| Boolean | leftDelimiter | If it's true a delimiter will be drawn between the left image and the middle part |
| String | Image | right | A string which can resolve to the src of an image. Or a javascript image element |
| Boolean | rightDelimiter | If it's true a delimiter will be drawn between the middle part and the right image |
| HTMLCanvasElement | image | A canvas image to be placed in the middle of the infoBubble. Not compatible with any of the above |
| Object | listeners | |
| Function | click | The function to be called when the infoBubble is clicked |
| Function | leftclick | If there is a params.left image specified, this function will be called when the vertical left portion of the infoBubble is clicked. The vertical left portion is everything up to, but not including the divider line, if it is present. The params.listeners.click event will not be fired. |
| Function | rightclick | As above. But on the right vertical third of the infoBubble |
| String | background | a string in the format: "rgb(200,0,0)" (solid red) or "rgba(0, 0, 200, 0.5)" (blue with 50% transparency) |
| Number | borderRadius | degree of curviness of the corners |
| Number | parent | parent control of the infoBubble |
| Function | [callback] | The function called when the infoBubble has been created. It receives the infoBubble object as a parameter. |