ZoomAndCenterMapView の例 - Java
ZoomAndCenterMapView オブジェクトを返す Java の例を以下に示します。
public static ZoomAndCenterMapView getZoomAndCenterMapView() throws Exception
{
ZoomAndCenterMapView zoomAndCenterMapView = new ZoomAndCenterMapView();
zoomAndCenterMapView.setHeight(600);
zoomAndCenterMapView.setWidth(800);
zoomAndCenterMapView.setUnit(PaperUnit.PIXEL);
//sets the map resolution. If not specified, the default one is set to 96 DPI
//zoomAndCenterMapView.setMapResolution(200);
Distance distance = new Distance();
distance.setValue(2000.0);
distance.setUom(DistanceUnit.KILOMETER);
zoomAndCenterMapView.setZoomLevel(distance);
Point point = BuildGeometry.buildPoint();
zoomAndCenterMapView.setMapCenter(point);
return zoomAndCenterMapView;
}