com.maryanovsky.map.client.widgets.overview
Class OverviewMapWidget.StandardSynchronization

java.lang.Object
  extended by com.maryanovsky.map.client.widgets.overview.OverviewMapWidget.StandardSynchronization
All Implemented Interfaces:
OverviewMapWidget.Synchronization
Enclosing class:
OverviewMapWidget

public static class OverviewMapWidget.StandardSynchronization
extends Object
implements OverviewMapWidget.Synchronization

The most commonly used implementation of OverviewMapWidget.Synchronization. It positions the overview map at the same location as the main map, zoomed out by the specified number of zooms.


Constructor Summary
OverviewMapWidget.StandardSynchronization(boolean animate)
          Creates a new OverviewMapWidget.StandardSynchronization with optionally animated transitions and the default main map portion threshold.
OverviewMapWidget.StandardSynchronization(double mainMapPortionThreshold, boolean animate)
          Creates a new StandardSynchronization with the specified main map portion threshold and optionally animated transitions on both maps.
 
Method Summary
 MapLocationModel createOverviewLocationModel(MapWidget mapWidget)
          Creates the MapLocationModel to be used for the overview map widget.
 void moveBoth(MapWidget mainWidget, OverviewMapWidget overviewWidget, LatLng location)
          Invoked to center both the main and the overview map widgets on the specified coordinate.
 void syncMain(MapWidget mainWidget, OverviewMapWidget overviewWidget)
          Invoked when the location of the overview map changes to apply these changes to the specified main map widget.
 void syncOverview(MapWidget mainWidget, OverviewMapWidget overviewWidget)
          Invoked when the location of the main map changes to apply these changes to the specified overview map widget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverviewMapWidget.StandardSynchronization

public OverviewMapWidget.StandardSynchronization(double mainMapPortionThreshold,
                                                 boolean animate)
Creates a new StandardSynchronization with the specified main map portion threshold and optionally animated transitions on both maps.

Parameters:
mainMapPortionThreshold - The maximum portion of the width and height of the overview map that the area of the main map is to be allowed to occupy (whenever possible). This determines the zoom at which the overview map is displayed.
animate - Whether to animate transitions on both maps. Note that a true value is merely a suggestion - certain transitions will not be animated regardless of the value of this parameter.

OverviewMapWidget.StandardSynchronization

public OverviewMapWidget.StandardSynchronization(boolean animate)
Creates a new OverviewMapWidget.StandardSynchronization with optionally animated transitions and the default main map portion threshold.

Method Detail

createOverviewLocationModel

public MapLocationModel createOverviewLocationModel(MapWidget mapWidget)
Creates the MapLocationModel to be used for the overview map widget.

Specified by:
createOverviewLocationModel in interface OverviewMapWidget.Synchronization

syncMain

public void syncMain(MapWidget mainWidget,
                     OverviewMapWidget overviewWidget)
Invoked when the location of the overview map changes to apply these changes to the specified main map widget.

Specified by:
syncMain in interface OverviewMapWidget.Synchronization

syncOverview

public void syncOverview(MapWidget mainWidget,
                         OverviewMapWidget overviewWidget)
Invoked when the location of the main map changes to apply these changes to the specified overview map widget.

Specified by:
syncOverview in interface OverviewMapWidget.Synchronization

moveBoth

public void moveBoth(MapWidget mainWidget,
                     OverviewMapWidget overviewWidget,
                     LatLng location)
Invoked to center both the main and the overview map widgets on the specified coordinate.

Specified by:
moveBoth in interface OverviewMapWidget.Synchronization