MGViewChangedObserver.onViewChanged   Go to object model Go to parent topic

Syntax

public abstract void onViewChanged(MGMap map)

Description

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.

Applies To

Plug-In and Java Edition only

Parameters

map - The map object for which the event occurred.

Error Codes

none

Note

Writing code in the onViewChanged event that changes the map view, such as map.refresh(); results in an infinite loop.

Example

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.

See Also

getViewChangedObserver, setViewChangedObserver