svn commit: r737369 - in /ofbiz/trunk: applications/ecommerce/data/ applications/party/webapp/partymgr/WEB-INF/actions/party/ applications/party/webapp/partymgr/party/ applications/party/webapp/partymgr/party/profileblocks/ applications/party/widget/pa...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r737369 - in /ofbiz/trunk: applications/ecommerce/data/ applications/party/webapp/partymgr/WEB-INF/actions/party/ applications/party/webapp/partymgr/party/ applications/party/webapp/partymgr/party/profileblocks/ applications/party/widget/pa...

jleroux@apache.org
Author: jleroux
Date: Sat Jan 24 14:48:25 2009
New Revision: 737369

URL: http://svn.apache.org/viewvc?rev=737369&view=rev
Log:
Add popup address Geolocation in party profile

Added:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy
      - copied unchanged from r737306, ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GeoLocation.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/party/partygeolocation.ftl
      - copied unchanged from r737306, ofbiz/trunk/applications/party/webapp/partymgr/party/geolocation.ftl
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GeoLocation.groovy
    ofbiz/trunk/framework/common/webcommon/WEB-INF/geolocation.ftl
    ofbiz/trunk/framework/images/webapp/images/GooglemapMarkers.js
      - copied, changed from r737306, ofbiz/trunk/framework/images/webapp/images/googlemap.js
    ofbiz/trunk/framework/images/webapp/images/GooglemapSimple.js
Removed:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/GeoLocation.groovy
    ofbiz/trunk/applications/party/webapp/partymgr/party/geolocation.ftl
    ofbiz/trunk/framework/images/webapp/images/googlemap.js
Modified:
    ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml
    ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
    ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
    ofbiz/trunk/framework/common/config/CommonUiLabels.xml
    ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
    ofbiz/trunk/framework/common/widget/CommonScreens.xml

Modified: ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml?rev=737369&r1=737368&r2=737369&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml (original)
+++ ofbiz/trunk/applications/ecommerce/data/DemoOrderPeopleData.xml Sat Jan 24 14:48:25 2009
@@ -61,7 +61,7 @@
     <PartyRole partyId="DemoCustCompany" roleTypeId="_NA_"/>
     
     <ContactMech contactMechId="9010" contactMechTypeId="POSTAL_ADDRESS"/>
-    <PostalAddress contactMechId="9010" toName="Demo Customer Company" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA"/>
+    <PostalAddress contactMechId="9010" toName="Demo Customer Company" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>
     <PartyContactMech partyId="DemoCustCompany" contactMechId="9010" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
     <PartyContactMechPurpose partyId="DemoCustCompany" contactMechId="9010" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="DemoCustCompany" contactMechId="9010" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
@@ -96,7 +96,7 @@
     <PartyRole partyId="DemoCustAgent" roleTypeId="AGENT"/>
     <PartyRole partyId="DemoCustAgent" roleTypeId="_NA_"/>
     <ContactMech contactMechId="9011" contactMechTypeId="POSTAL_ADDRESS"/>
-    <PostalAddress contactMechId="9011" toName="Demo Customer Agent" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA"/>
+    <PostalAddress contactMechId="9011" toName="Demo Customer Agent" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>
     <PartyContactMech partyId="DemoCustAgent" contactMechId="9011" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
     <PartyContactMechPurpose partyId="DemoCustAgent" contactMechId="9011" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="DemoCustAgent" contactMechId="9011" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
@@ -122,7 +122,7 @@
     <PartyGeoPoint partyId="DemoCustomer" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>    
     
     <ContactMech contactMechId="9015" contactMechTypeId="POSTAL_ADDRESS"/>
-    <PostalAddress contactMechId="9015" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>    
+    <PostalAddress contactMechId="9015" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000" geoPointId="9000"/>    
     <PartyContactMech partyId="DemoCustomer" contactMechId="9015" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="9015" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="9015" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
@@ -156,7 +156,7 @@
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="GENERAL_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
-    <PostalAddress contactMechId="EUROCUSTOMER" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA"/>
+    <PostalAddress contactMechId="EUROCUSTOMER" toName="Demo Customer" address1="2004 Factory Blvd" city="Orem" stateProvinceGeoId="UT" postalCode="84057" countryGeoId="USA" geoPointId="9000"/>
     <PartyContactMech partyId="EuroCustomer" contactMechId="EUROCUSTOMER" fromDate="2001-05-13 00:00:00.000" allowSolicitation="Y"/>
     <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="BILLING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>
     <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EUROCUSTOMER" contactMechPurposeTypeId="SHIPPING_LOCATION" fromDate="2001-05-13 00:00:00.000"/>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl?rev=737369&r1=737368&r2=737369&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/profileblocks/Contact.ftl Sat Jan 24 14:48:25 2009
@@ -84,6 +84,10 @@
                       <a target="_blank" href="http://www.whitepages.com/find_person_results.pl?fid=a&s_n=${addressNum}&s_a=${addressOther}&c=${postalAddress.city?if_exists}&s=${postalAddress.stateProvinceGeoId?if_exists}&x=29&y=18">(lookup:whitepages.com)</a>
                     </#if>
                   </#if>
+                  <#if postalAddress.geoPointId?has_content>
+                    <#assign popUptitle = contactMechPurposeType.get("description",locale) + uiLabelMap.CommonGeoLocation>
+                    <a href="javascript:popUp('<@ofbizUrl>geoLocation?geoPointId=${postalAddress.geoPointId}</@ofbizUrl>', '${popUptitle}', '450', '550')" class="buttontext">${uiLabelMap.CommonGeoLocation}</a>
+                  </#if>
                 <#elseif "TELECOM_NUMBER" = contactMech.contactMechTypeId>
                   <#assign telecomNumber = contactMechMap.telecomNumber>
                   <div>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=737369&r1=737368&r2=737369&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Sat Jan 24 14:48:25 2009
@@ -1168,13 +1168,13 @@
             <actions>
                 <set field="titleProperty" value="PageTitleViewPartyGeoLocation"/>
                 <set field="partyId"  from-field="parameters.partyId"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GeoLocation.groovy"/>
+                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/PartyGeoLocation.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <platform-specific>
-                            <html><html-template location="component://party/webapp/partymgr/party/geolocation.ftl"/></html>
+                            <html><html-template location="component://party/webapp/partymgr/party/partygeolocation.ftl"/></html>
                         </platform-specific>
                     </decorator-section>
                 </decorator-screen>

Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=737369&r1=737368&r2=737369&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Sat Jan 24 14:48:25 2009
@@ -3980,8 +3980,8 @@
         <value xml:lang="zh_CN">不包含</value>
     </property>
     <property key="CommonNoGeolocationAvailable">
-        <value xml:lang="en">No Geolocation Available (for a demo you may try using DemoCustomer party)</value>
-        <value xml:lang="fr">Aucune géolocalisation disponible (pour une démonstration vous pouvez utiliser l'acteur DemoCustomer)</value>
+        <value xml:lang="en">No Geolocation Available (for a demo you may try using DemoCustomer party profil)</value>
+        <value xml:lang="fr">Aucune géolocalisation disponible (pour une démonstration vous pouvez utiliser le profil de l'acteur DemoCustomer)</value>
     </property>    
     <property key="CommonNoUomConversionFound">
         <value xml:lang="ar">علاقة تحويل وحدات القياس غير موجودة</value>

Added: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GeoLocation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GeoLocation.groovy?rev=737369&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GeoLocation.groovy (added)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/GeoLocation.groovy Sat Jan 24 14:48:25 2009
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+if (geoPoint) {
+    elevationUom = delegator.findOne("Uom", [uomId : geoPoint.elevationUomId], false);
+    context.elevationUomAbbr = elevationUom.abbreviation;
+}

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml?rev=737369&r1=737368&r2=737369&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/common-controller.xml Sat Jan 24 14:48:25 2009
@@ -141,7 +141,11 @@
     <request-map uri="viewBlocked">
         <response name="success" type="view" value="viewBlocked"/>
     </request-map>
-
+    
+    <request-map uri="geoLocation">
+        <response name="success" type="view" value="geoLocation"/>
+    </request-map>
+    
     <!-- View Mappings -->
     <view-map name="error" page="/error/error.jsp"/>
     <view-map name="main" type="none"/>
@@ -155,7 +159,9 @@
     <view-map name="LookupVisualThemes" type="screen" page="component://common/widget/LookupScreens.xml#LookupVisualThemes"/>
 
     <view-map name="ajaxAutocompleteOptions" type="screen" page="component://common/widget/CommonScreens.xml#ajaxAutocompleteOptions"/>
-    <view-map name="help" type="screen" page="component://common/widget/CommonScreens.xml#help"/>
 
+    <view-map name="help" type="screen" page="component://common/widget/CommonScreens.xml#help"/>
+    <view-map name="geoLocation" type="screen" page="component://common/widget/CommonScreens.xml#geoLocation"/>    
+    
     <view-map name="viewBlocked" type="screen" page="component://common/widget/CommonScreens.xml#viewBlocked"/>
 </site-conf>

Added: ofbiz/trunk/framework/common/webcommon/WEB-INF/geolocation.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/geolocation.ftl?rev=737369&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/geolocation.ftl (added)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/geolocation.ftl Sat Jan 24 14:48:25 2009
@@ -0,0 +1,48 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<#if geoPoint?has_content>
+  <#if geoPoint.latitude?has_content && geoPoint.longitude?has_content>
+    ${uiLabelMap.CommonLatitude}${geoPoint.latitude}<br>
+    ${uiLabelMap.CommonLongitude}${geoPoint.longitude}
+    <#if geoPoint.elevation?has_content>
+      <br>${uiLabelMap.CommonElevation}${geoPoint.elevation} ${elevationUomAbbr}
+    </#if>  
+    <#if geoPoint.dataSourceId?has_content>        
+      <#if geoPoint.dataSourceId == "GEOPT_GOOGLE">
+        <div id="map" style="border:1px solid #979797; background-color:#e5e3df; width:400px; height:300px; margin:2em auto;">
+          <div style="padding:1em; color:gray;">${uiLabelMap.CommonLoading}</div>
+        </div>
+        <#assign defaultUrl = "https." + request.getServerName()>
+        <#assign defaultGogleMapKey = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("general.properties", defaultUrl)>
+        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=${defaultGogleMapKey}"
+            type="text/javascript">
+        </script>
+        <script type="text/javascript">
+          loadGoogleMap("${geoPoint.latitude}",
+                        "${geoPoint.longitude}")
+        </script>          
+      <#elseif  geoPoint.dataSourceId == "GEOPT_YAHOO">            
+      <#elseif  geoPoint.dataSourceId == "GEOPT_MICROSOFT">      
+      <#elseif  geoPoint.dataSourceId == "GEOPT_MAPTP">      
+      </#if>  
+    </#if>  
+  </#if>
+<#else>
+  <h2>${uiLabelMap.CommonNoGeolocationAvailable}</h2>      
+</#if>

Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=737369&r1=737368&r2=737369&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sat Jan 24 14:48:25 2009
@@ -119,7 +119,7 @@
                 <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/images/calendar_date_select.js" global="true"/>
-                <set field="layoutSettings.javaScripts[]" value="/images/googlemap.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/images/GooglemapMarkers.js" global="true"/>
                 <set field="layoutSettings.commonHeaderImageLinkUrl" from-field="layoutSettings.commonHeaderImageLinkUrl" default-value="main" global="true"/>
                 <service service-name="getUserPreferenceGroup" result-map-name="prefResult">
                     <field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/>
@@ -276,6 +276,7 @@
                 <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/prototype.js" global="true"/>
                 <set field="layoutSettings.javaScripts[]" value="/images/calendar_date_select.js" global="true"/>
+                <set field="layoutSettings.javaScripts[]" value="/images/GooglemapSimple.js" global="true"/>                
                 <!-- The default (global) shortcut icon -->
                 <set field="layoutSettings.shortcutIcon" value="/images/ofbiz.ico" global="true"/>
                 <!-- The settings below are used for xsl-fo screens -->
@@ -472,4 +473,25 @@
         </section>
     </screen>
 
+    <screen name="geoLocation">
+        <section>
+            <actions>
+                <set field="titleProperty" value="CommonGeoLocation"/>
+                <entity-one entity-name="GeoPoint" value-field="geoPoint">
+                    <field-map field-name="geoPointId" from-field="parameters.geoPointId"/>
+                </entity-one>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/GeoLocation.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SimpleDecorator">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/WEB-INF/geolocation.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>        
+
 </screens>

Copied: ofbiz/trunk/framework/images/webapp/images/GooglemapMarkers.js (from r737306, ofbiz/trunk/framework/images/webapp/images/googlemap.js)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/GooglemapMarkers.js?p2=ofbiz/trunk/framework/images/webapp/images/GooglemapMarkers.js&p1=ofbiz/trunk/framework/images/webapp/images/googlemap.js&r1=737306&r2=737369&rev=737369&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/googlemap.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/GooglemapMarkers.js Sat Jan 24 14:48:25 2009
@@ -26,7 +26,6 @@
         map = new GMap2(document.getElementById("map"));
         map.setCenter(new GLatLng(lat, lgt), 13);        
         marker = new GMarker(new GLatLng(lat, lgt));
-        map.setCenter(new GLatLng(lat, lgt), 13);
         map.addControl(new GSmallMapControl());
         map.addOverlay(marker);
         info1 = typeof(link1)!="undefined" && typeof(text1)!="undefined";

Added: ofbiz/trunk/framework/images/webapp/images/GooglemapSimple.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/GooglemapSimple.js?rev=737369&view=auto
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/GooglemapSimple.js (added)
+++ ofbiz/trunk/framework/images/webapp/images/GooglemapSimple.js Sat Jan 24 14:48:25 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// A basic Google Map function to render a marker centered on a map
+
+function loadGoogleMap(lat,lgt, link1, text1, link2, text2) {
+    if (GBrowserIsCompatible()) {
+        lat = lat.replace(",","."); // For decimals separator, in French for instance, please add more if needed
+        lgt = lgt.replace(",","."); // For decimals separator, in French for instance, please add more if needed
+        map = new GMap2(document.getElementById("map"));
+        map.setCenter(new GLatLng(lat, lgt), 13);        
+        marker = new GMarker(new GLatLng(lat, lgt));
+        map.addControl(new GSmallMapControl());
+        map.addOverlay(marker);
+      }
+}
\ No newline at end of file