Welcome! Our Tools - BpBrowser
- BpControl
- BpDownloadUrl
- BpLabel
- BpMarker
- BpMarkerLight
- BpMarkerList
About Us Licensing Fees Support Contact Us

808-281-3359


BpControl Reference

Introduction

Download

This is a basic class for showing some HTML in the map.

There is no fee for commercial use of BpControl.

new BpControl()

Code:
var control = new BpControl(html?,size?,anchor?,className?);
map.addControl(control);


Remarks:

html defaults to 'Loading...'.
size determines how far away the control will appear, relative to anchor. It defaults to new GSize(100,100).
anchor defaults to G_ANCHOR_TOP_LEFT.
className is optional. If false, then reasonable default styles are added to the html div.

The possible values for anchor:

  • G_ANCHOR_TOP_LEFT (default)
  • G_ANCHOR_TOP_RIGHT
  • G_ANCHOR_BOTTOM_LEFT
  • G_ANCHOR_BOTTOM_RIGHT

Notes:
  • Aside from handling the boring stuff for you, this control makes the map manage the positioning of the html during window resizing, etc.
  • If you want to be able to call control.get/setClassName(), you'll need to pass a className to the contructor.
  • The control will be hidden by default. Call control.show() to show it.
  • BpControls are not printable or selectable.

Examples:

get/setClassName()

Code:
var className = control.getClassName();
control.setClassName(className);


Remarks:

This will determine how the html div is styled.

Notes:
  • If you want to be able to call control.get/setClassName(), you'll need to pass a className to the contructor.

Examples:

getDiv()

Code:
var div = control.getDiv();


Remarks:

Returns the html's container div.

getDivId()

Code:
var id = control.getDivId();


Remarks:

You can use this to get the id of the html's container div, for use in document.getElementById() calls.

get/setContent()

Code:
var msg = control.getContent();
control.setContent(msg);


Remarks:

Manage the control's HTML content.

Examples:

hide()

Code:
control.hide();


Remarks:

Hides the control.

Examples:

show()

Code:
control.show();


Remarks:

Shows the control.

Examples: