| MGViewChangedObserver.onViewChanged |
|
public abstract void onViewChanged(MGMap map)
The changed view observer method. This event is fired after the view of the map has been updated or refreshed.
This topic describes this event for Plug-In and Java Edition only. For ActiveX Control, see onViewChanged.
Plug-In and Java Edition only
map - The map object for which the event occurred.
none
Writing code in the onViewChanged event that changes the map view, such as map.refresh(); results in an infinite loop.
To handle this event from the Plug-In or Java Edition, a Java object that implements the MGViewChangedObserver interface must be established with a call to the setViewChangedObserver method. The observer Java object should include the following:
<class_definition> implements MGViewChangedObserver
{
// ...
public void onViewChanged(MGMap map)
{
// event handling code here...
}
// ...
}
The simplest way to include the observer object in a Web page is to implement it as an applet. See Advanced Examples for a fully functional observer object that supports all of the observer interfaces by forwarding the events back to JavaScript functions that have identical semantics to the ActiveX Control event handlers.
getViewChangedObserver, setViewChangedObserver