Added the geoChart common screen. (OFBIZ-3348)

This can be used to show a set of geo points on a Google map.
The screen takes as input a geoChart map containing:
    * dataSourceId -> select the map system to be used (google, yahoo etc.)
    * width -> map dimensions
    * height -> map dimensions
    * center -> the center point of the map
    * points -> the points array to be showed on the map

Several example screens have been also added to the Example application

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@892579 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bruno Busco
2009-12-20 09:41:03 +00:00
parent a5d07a3295
commit d9ea486930
6 changed files with 248 additions and 1 deletions
@@ -25,7 +25,6 @@ under the License.
<screen name="FindExample">
<section>
<actions>
<set field="headerItem" value="Example"/>
<set field="titleProperty" value="PageTitleFindExample"/>
<set field="exampleCtx" from-field="parameters"/>
</actions>
@@ -149,4 +148,135 @@ under the License.
</section>
</screen>
<screen name="ExampleGeoLocationPointSet1">
<section>
<actions>
<set field="tabButtonItem" value="ExampleGeoLocationPointSet1"/>
<set field="geoPoints[+0].lat" value="37,4419" type="Float"/>
<set field="geoPoints[0].lon" value="-122,1419" type="Float"/>
<set field="geoPoints[+1].lat" value="37,4819" type="Float"/>
<set field="geoPoints[1].lon" value="-122,1519" type="Float"/>
<set field="geoPoints[+2].lat" value="37,4719" type="Float"/>
<set field="geoPoints[2].lon" value="-122,1319" type="Float"/>
<set field="geoCenter.lat" value="37,4419" type="Float"/>
<set field="geoCenter.lon" value="-122,1419" type="Float"/>
<set field="geoCenter.zoom" value="13"/>
</actions>
<widgets>
<decorator-screen name="CommonExampleGeoLocationDecorator" location="${parameters.mainDecoratorLocation}">
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ExampleGeoLocationPointSet2">
<section>
<actions>
<set field="tabButtonItem" value="ExampleGeoLocationPointSet2"/>
<set field="geoPoints[+0].lat" value="37,4459" type="Float"/>
<set field="geoPoints[0].lon" value="-122,1489" type="Float"/>
<set field="geoPoints[+1].lat" value="37,4829" type="Float"/>
<set field="geoPoints[1].lon" value="-122,1599" type="Float"/>
<set field="geoPoints[+2].lat" value="37,4769" type="Float"/>
<set field="geoPoints[2].lon" value="-122,1219" type="Float"/>
<set field="geoCenter.lat" value="37,4419" type="Float"/>
<set field="geoCenter.lon" value="-122,1419" type="Float"/>
<set field="geoCenter.zoom" value="12"/>
</actions>
<widgets>
<decorator-screen name="CommonExampleGeoLocationDecorator" location="${parameters.mainDecoratorLocation}">
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ExampleGeoLocationPointSet3">
<section>
<actions>
<set field="tabButtonItem" value="ExampleGeoLocationPointSet3"/>
<set field="geoPoints[+0].lat" value="37,4379" type="Float"/>
<set field="geoPoints[0].lon" value="-122,1119" type="Float"/>
<set field="geoPoints[+1].lat" value="37,4819" type="Float"/>
<set field="geoPoints[1].lon" value="-122,1519" type="Float"/>
<set field="geoPoints[+2].lat" value="37,4229" type="Float"/>
<set field="geoPoints[2].lon" value="-122,1369" type="Float"/>
<set field="geoCenter.lat" value="37,4419" type="Float"/>
<set field="geoCenter.lon" value="-122,1419" type="Float"/>
<set field="geoCenter.zoom" value="11"/>
</actions>
<widgets>
<decorator-screen name="CommonExampleGeoLocationDecorator" location="${parameters.mainDecoratorLocation}">
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ExampleGeoLocationPointSet4">
<section>
<actions>
<set field="tabButtonItem" value="ExampleGeoLocationPointSet4"/>
<set field="geoChart.dataSourceId" value="GEOPT_GOOGLE"/>
<set field="geoChart.width" value="600"/>
<set field="geoChart.height" value="500"/>
<set field="geoChart.points" from-field="geoPoints"/>
<set field="geoChart.center" from-field="geoCenter"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="pre-body">
<include-menu name="ExampleGeoLocation" location="component://example/widget/example/ExampleMenus.xml"/>
</decorator-section>
<decorator-section name="body">
<section>
<widgets>
<section>
<actions>
<set field="geoPoints[+0].lat" value="37,4459" type="Float"/>
<set field="geoPoints[0].lon" value="-122,1489" type="Float"/>
<set field="geoPoints[+1].lat" value="37,4829" type="Float"/>
<set field="geoPoints[1].lon" value="-122,1599" type="Float"/>
<set field="geoPoints[+2].lat" value="37,4769" type="Float"/>
<set field="geoPoints[2].lon" value="-122,1219" type="Float"/>
<set field="geoCenter.lat" value="37,4419" type="Float"/>
<set field="geoCenter.lon" value="-122,1419" type="Float"/>
<set field="geoCenter.zoom" value="12"/>
<set field="geoChart.id" value="chart1"/>
<set field="geoChart.dataSourceId" value="GEOPT_GOOGLE"/>
<set field="geoChart.width" value="600"/>
<set field="geoChart.height" value="500"/>
<set field="geoChart.points" from-field="geoPoints"/>
<set field="geoChart.center" from-field="geoCenter"/>
</actions>
<widgets>
<include-screen name="geoChart" location="component://common/widget/CommonScreens.xml"/>
</widgets>
</section>
<section>
<actions>
<set field="geoPoints" value=""/>
<set field="geoPoints[+0].lat" value="37,4379" type="Float"/>
<set field="geoPoints[0].lon" value="-122,1119" type="Float"/>
<set field="geoPoints[+1].lat" value="37,4819" type="Float"/>
<set field="geoPoints[1].lon" value="-122,1519" type="Float"/>
<set field="geoPoints[+2].lat" value="37,4229" type="Float"/>
<set field="geoPoints[2].lon" value="-122,1369" type="Float"/>
<set field="geoCenter.lat" value="37,4419" type="Float"/>
<set field="geoCenter.lon" value="-122,1419" type="Float"/>
<set field="geoCenter.zoom" value="11"/>
<set field="geoChart.id" value="chart2"/>
<set field="geoChart.dataSourceId" value="GEOPT_GOOGLE"/>
<set field="geoChart.width" value="800"/>
<set field="geoChart.height" value="500"/>
<set field="geoChart.points" from-field="geoPoints"/>
<set field="geoChart.center" from-field="geoCenter"/>
</actions>
<widgets>
<include-screen name="geoChart" location="component://common/widget/CommonScreens.xml"/>
</widgets>
</section>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>