⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fixedzoomintool.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.tools;

import com.esri.adf.web.data.WebMap;
import com.esri.adf.web.data.geometry.WebExtent;
import com.esri.adf.web.data.geometry.WebPoint;
import com.esri.adf.web.faces.event.MapEvent;
import com.esri.adf.web.faces.event.MapToolAction;
import com.esri.solutions.jitk.commands.FixedZoomAction;

/**
 * The zoom in command.
 */
@SuppressWarnings("serial")
public class FixedZoomInTool extends FixedZoomAction implements MapToolAction {
	/**
	 * Zooms in at the passed center point
	 */
	public void zoomInAtPoint(MapEvent event) {
		WebMap webMap = event.getWebContext().getWebMap();

		WebPoint webExtentCenterPoint = (WebPoint) 
			event.getWebGeometry().toMapGeometry(webMap);
		
		WebExtent newExtent = getScaledExtent(webMap.getCurrentExtent(),
				getZoomFactor(), webExtentCenterPoint);
		webMap.setCurrentExtent(newExtent);
		getWebContext().refresh(webMap);
	}

	public void execute(MapEvent mapEvent) throws Exception {
		zoomInAtPoint(mapEvent);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -