Gpolyline"

From Documentation
(1st Draft)
m ((via JWB))
(15 intermediate revisions by 6 users not shown)
Line 3: Line 3:
 
= Gpolyline =
 
= Gpolyline =
  
*Demonstration: N/A
+
*Demonstration: [http://www.zkoss.org/zkdemo/reporting/google_map Gmaps]
 
*Java API: N/A
 
*Java API: N/A
 
*JavaScript API: N/A
 
*JavaScript API: N/A
 +
*Style Guide: N/A
  
 
= Employment/Purpose =
 
= Employment/Purpose =
  
Polyline drawn on the Google Maps per the given (latitude, longitude) points.
+
Polyline drawn on the Google Maps per the given (latitude, longitude) points and visible zoom level(0~3).
  
 
= Example =
 
= Example =
Line 16: Line 17:
  
 
<source lang="xml" >
 
<source lang="xml" >
<window title="Google Maps">
+
<window title="Google Maps" border="normal" width="520px">
  <gmaps id="mymap" width="500px" height="300px" showSmallCtrl="true">
+
    <script type="text/javascript" content="zk.googleAPIkey='Your-Google-API-Key'"/>
<gpolyline points="37.42838786,-122.13998795,3,37.43561240,-122.13277816,3,37.42416187,-122.11441040,3,37.42157162,-122.12007522,3,37.41734524,-122.12316513,3,37.42838786,-122.13998795,3"/>
+
    <gmaps id="mymap" width="500px" height="300px" showSmallCtrl="true">
  </gmaps>
+
        <gpolyline points="37.42838786,-122.13998795,3,37.43561240,-122.13277816,3,37.42416187,-122.11441040,3,
</window>
+
                                      37.42157162,-122.12007522,3,37.41734524,-122.12316513,3,37.42838786,-122.13998795,3"/>
 +
    </gmaps>
 +
</window>
 
</source>
 
</source>
  
=Supported events=
+
== Disable Path Encoding ==
  
 +
{{versionSince| 3.3.0}}
  
{| border="1" | width="100%"
+
In order to preserve bandwidth the polyline/polygon path coordinates are encoded (default) with a [https://developers.google.cn/maps/documentation/utilities/polylinealgorithm lossy algorithm] (i.e. some precision is lost - visible at high zoom levels). In cases where the highest precision is needed (e.g. when editing a polyline/polygon) this encoding can be disabled by setting <code>pathEncoded="false"</code> / <code>polygon.setPathEncoded(false);</code> - at the cost of increased network request and response sizes.
 +
 
 +
=Supported Events=
 +
 
 +
 
 +
{| class='wikitable' | width="100%"
 
! <center>Name</center>
 
! <center>Name</center>
 
! <center>Event Type</center>
 
! <center>Event Type</center>
Line 33: Line 42:
 
| None
 
| None
 
|}
 
|}
 +
 +
*Inherited Supported Events: [[ZK_Component_Reference/Base_Components/XulElement#Supported_Events | XulElement]]
  
 
=Supported Children=
 
=Supported Children=
Line 38: Line 49:
 
  *None
 
  *None
  
=Use cases=
+
=Use Cases=
  
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Description !! Example Location
 
! Version !! Description !! Example Location
 
|-
 
|-
Line 49: Line 60:
  
 
=Version History=
 
=Version History=
 +
{{LastUpdated}}
  
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| 2.51
+
| &nbsp;
| 05/18/2010
+
| &nbsp;
| Initialization
+
| &nbsp;
 
|}
 
|}
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Revision as of 08:28, 8 July 2022

Gpolyline

  • Demonstration: Gmaps
  • Java API: N/A
  • JavaScript API: N/A
  • Style Guide: N/A

Employment/Purpose

Polyline drawn on the Google Maps per the given (latitude, longitude) points and visible zoom level(0~3).

Example

ZKComRef Gpolyline Example.png

<window title="Google Maps" border="normal" width="520px">
    <script type="text/javascript" content="zk.googleAPIkey='Your-Google-API-Key'"/>
    <gmaps id="mymap" width="500px" height="300px" showSmallCtrl="true">
        <gpolyline points="37.42838786,-122.13998795,3,37.43561240,-122.13277816,3,37.42416187,-122.11441040,3,
                                       37.42157162,-122.12007522,3,37.41734524,-122.12316513,3,37.42838786,-122.13998795,3"/>
    </gmaps>
</window>

Disable Path Encoding

Since  3.3.0

In order to preserve bandwidth the polyline/polygon path coordinates are encoded (default) with a lossy algorithm (i.e. some precision is lost - visible at high zoom levels). In cases where the highest precision is needed (e.g. when editing a polyline/polygon) this encoding can be disabled by setting pathEncoded="false" / polygon.setPathEncoded(false); - at the cost of increased network request and response sizes.

Supported Events

Name
Event Type
None None

Supported Children

*None

Use Cases

Version Description Example Location
     

Version History

Last Update : 2022/07/08


Version Date Content
     



Last Update : 2022/07/08

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.