public final class Popup extends ILayer
Map.openPopup
to open popups while making sure that only one
popup is open at one time (recommended for usability), or use
Map.addLayer
to open as many as you want.Constructor and Description |
---|
Popup()
Instantiates a Popup object given an optional options object that
describes its appearance and location and an optional source object that
is used to tag the popup with a reference to the ILayer to which it
refers.
|
Popup(ILayer source)
Instantiates a Popup object given an source object that is used to tag
the popup with a reference to the ILayer to which it refers.
|
Popup(PopupOptions options)
Instantiates a Popup object given an options object that describes its
appearance and location.
|
Popup(PopupOptions options,
ILayer source)
Instantiates a Popup object given an optional options object that
describes its appearance and location and an optional source object that
is used to tag the popup with a reference to the ILayer to which it
refers.
|
Modifier and Type | Method and Description |
---|---|
Popup |
addTo(Map map)
Adds the popup to the map.
|
String |
getContent()
Returns the content of the popup.
|
LatLng |
getLatLng()
Returns the geographical point of popup.
|
Popup |
openOn(Map map)
Adds the popup to the map and closes the previous one.
|
Popup |
setContent(String htmlContent)
Sets the HTML content of the popup.
|
Popup |
setLatLng(LatLng latLng)
Sets the geographical point where the popup will open.
|
Popup |
update()
Updates the popup content, layout and position.
|
public Popup()
public Popup(PopupOptions options)
options
- options object that describes popup's appearance and
locationpublic Popup(PopupOptions options, ILayer source)
options
- options object that describes popup's appearance and
locationsource
- Source object that is used to tag the popup with a
reference to the ILayer to which it referspublic Popup(ILayer source)
source
- Source object that is used to tag the popup with a
reference to the ILayer to which it referspublic Popup addTo(Map map)
map
- The mappublic Popup openOn(Map map)
map.openPopup
.map
- The mappublic Popup setLatLng(LatLng latLng)
latLng
- The LatLng locationpublic LatLng getLatLng()
public Popup setContent(String htmlContent)
htmlContent
- HTML content of the popuppublic String getContent()
public Popup update()
Copyright © 2017. All rights reserved.