Adding geolocation using openstreetmap, examples are taken from the google existing ones

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@986095 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erwan de Ferrieres
2010-08-16 18:56:25 +00:00
parent 89dec0b0bf
commit 0ae7083542
5 changed files with 191 additions and 0 deletions
@@ -215,6 +215,30 @@ under the License.
</section>
</screen>
<screen name="CommonExampleOsmGeoLocationDecorator">
<section>
<actions>
<set field="headerItem" value="ExampleGeoLocation"/>
<set field="geoChart.dataSourceId" value="GEOPT_OSM"/>
<set field="geoChart.width" value="600px"/>
<set field="geoChart.height" value="500px"/>
<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">
<container style="clear" />
<include-screen name="geoChart" location="component://common/widget/CommonScreens.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="CommonBirtDecorator">
<section>
<actions>
@@ -74,6 +74,11 @@ under the License.
<menu-item name="ExampleGeoLocationPointSet3" title="${uiLabelMap.PointSet3}"><link target="ExampleGeoLocationPointSet3"/></menu-item>
<menu-item name="ExampleGeoLocationPointSet4" title="${uiLabelMap.PointSet4}"><link target="ExampleGeoLocationPointSet4"/></menu-item>
<menu-item name="ExampleGeoLocationAddress" title="${uiLabelMap.ExamplePointAddress}"><link target="ExampleGeoLocationAddress"/></menu-item>
<!--Examples using openstreetmap -->
<menu-item name="ExampleOsmGeoLocationPointSet1" title="${uiLabelMap.OsmPointSet1}"><link target="ExampleOsmGeoLocationPointSet1"/></menu-item>
<menu-item name="ExampleOsmGeoLocationPointSet2" title="${uiLabelMap.OsmPointSet2}"><link target="ExampleOsmGeoLocationPointSet2"/></menu-item>
<menu-item name="ExampleOsmGeoLocationPointSet3" title="${uiLabelMap.OsmPointSet3}"><link target="ExampleOsmGeoLocationPointSet3"/></menu-item>
<menu-item name="ExampleOsmGeoLocationPointSet4" title="${uiLabelMap.OsmPointSet4}"><link target="ExampleOsmGeoLocationPointSet4"/></menu-item>
</menu>
<menu name="BirtTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
@@ -336,4 +336,134 @@ under the License.
</widgets>
</section>
</screen>
<screen name="ExampleOsmGeoLocationPointSet1">
<section>
<actions>
<set field="tabButtonItem" value="ExampleOsmGeoLocationPointSet1"/>
<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>
<include-screen name="CommonExampleOsmGeoLocationDecorator" location="${parameters.mainDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="ExampleOsmGeoLocationPointSet2">
<section>
<actions>
<set field="tabButtonItem" value="ExampleOsmGeoLocationPointSet2"/>
<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>
<include-screen name="CommonExampleOsmGeoLocationDecorator" location="${parameters.mainDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="ExampleOsmGeoLocationPointSet3">
<section>
<actions>
<set field="tabButtonItem" value="ExampleOsmGeoLocationPointSet3"/>
<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>
<include-screen name="CommonExampleOsmGeoLocationDecorator" location="${parameters.mainDecoratorLocation}"/>
</widgets>
</section>
</screen>
<screen name="ExampleOsmGeoLocationPointSet4">
<section>
<actions>
<set field="headerItem" value="ExampleGeoLocation"/>
<set field="tabButtonItem" value="ExampleOsmGeoLocationPointSet4"/>
<set field="geoChart.dataSourceId" value="GEOPT_GOOGLE"/>
<set field="geoChart.width" value="600px"/>
<set field="geoChart.height" value="500px"/>
<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_OSM"/>
<set field="geoChart.width" value="600px"/>
<set field="geoChart.height" value="500px"/>
<set field="geoChart.points" from-field="geoPoints"/>
<set field="geoChart.center" from-field="geoCenter"/>
</actions>
<widgets>
<container style="clear" />
<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_OSM"/>
<set field="geoChart.width" value="800px"/>
<set field="geoChart.height" value="500px"/>
<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>