gmaps.zul

来自「非常接近C/S操作方式的Java Ajax框架-ZK 用ZK框架使你的B/S应」· ZUL 代码 · 共 81 行

ZUL
81
字号
<?xml version="1.0" encoding="UTF-8"?><!--gmaps.zul{{IS_NOTE	Purpose:			Description:			History:		Sat Oct 14 10:54:31     2006, Created by henrichen}}IS_NOTECopyright (C) 2006 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="demo">	<vbox width="100%">		<html>			<attribute name="content"><![CDATA[	<h4>Demo of Google Maps</h4>	<p><a href="http://maps.google.com">Google Maps</a> is a popular maps service developed by Google.</p>	<p>In this demo, user can enter the new center(latitude and longitude) of the maps and the maps would 	move to show the new location. User can also drag the maps around to a new location and see the 	current center of the maps.</p>			]]></attribute>		</html>		<groupbox mold="3d" width="100%">			<caption label="View"><button label="Reload" height="18px" use="org.zkoss.zkdemo.userguide.ReloadButton"/></caption>			<window id="view">			</window>		</groupbox>		<groupbox id="tryView" mold="3d" open="false" width="100%">			<caption label="Source"><button label="Try me!" use="org.zkoss.zkdemo.userguide.TryMeButton"/></caption>			<textbox id="codeView" use="org.zkoss.zkdemo.userguide.CodeView" class="code" rows="10" width="100%">				<attribute name="value"><![CDATA[<window title="Google Maps">	<div style="border: 1px solid red;margin-top:10px;margin-bottom:20px"	if="${empty desktopScope.gmapsKey}">		To use Google Maps for this site, you have to assign a proper key first.		Check the source codes of org.zkoss.zkdemo.userguide.MainWindow for details.	</div>	<vbox>	<gmaps id="mymap" width="500px" height="300px" showSmallCtrl="true">		<attribute name="onMapMove">			mylat.setValue(self.getLat());			mylng.setValue(self.getLng());		</attribute>		<attribute name="onMapZoom">			myzoom.setValue(self.getZoom());		</attribute>		<ginfo id="myinfo" open="true">			<attribute name="content">				Hello, &lt;a href="http://www.zkoss.org"&gt;ZK&lt;/a&gt;.			</attribute>		</ginfo>				<gmarker id="mymark" lat="37.4410" lng="-122.1490">			<attribute name="content">				Hello, &lt;a href="http://www.zkoss.org"&gt;ZK&lt;/a&gt; on top of Gmarker.			</attribute>		</gmarker>	</gmaps>	<grid><rows>		<row>Latitude: <doublebox id="mylat" value="&#36;{mymap.lat}" onChange="mymap.panTo(self.doubleValue(), mymap.getLng())"/></row>		<row>Longitude: <doublebox id="mylng" value="&#36;{mymap.lng}" onChange="mymap.panTo(mymap.getLat(), self.doubleValue())"/></row>		<row>Zoom Level: <intbox id="myzoom" value="&#36;{mymap.zoom}" onChange="mymap.setZoom(self.getValue())"/></row>		<row>Open Info: <button label="Change" onClick="myinfo.isOpen() ? mymark.setOpen(true) : myinfo.setOpen(true)"/></row>	</rows></grid>	</vbox></window>				]]></attribute>			</textbox>		</groupbox>	</vbox></window>

⌨️ 快捷键说明

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