#1 (permalink)  
Alt 02.06.2007, 13:47
Benutzerbild von pixeleyes
VEYTON Service Partner
 
Registriert seit: 10.10.2005
Beiträge: 97
Standard Google map

Einbindung der Google-map im Kontaktformular (umgeändert vom ZenCart-Modul):


1.API key holen von google (http://www.google.com/apis/maps/signup.html)
2. Danach am besten zu http://maps.google.com/maps/mm?mapprev=1 gehen und da eine eigene karte anlegen.
Sollten Sie dies gemacht haben, klicken Sie oben auf "URL zu dieser Seite".
kopieren Sie dann aus der Url folgendes:
z.b. http://maps.google.com/maps/mm?mappr...6768&z=13&om=1
51.225163,6.785431 stehen für Latitude, Longitude
2. Tragen Sie die Daten in Admin/Mein Shop ein


includes/heaader.php /////////////////////////////////////////////
Zeile ca 262
Zitat:
if (strstr($PHP_SELF, FILENAME_POPUP_IMAGE )) {
echo '<body onload="resize();"> ';
} else {
echo '<body>';
}
ersetzen durch

Zitat:
if (strstr($PHP_SELF, FILENAME_POPUP_IMAGE )) {
echo '<body onload="resize();"> ';
}elseif (strstr($PHP_SELF, FILENAME_CONTENT )) {
echo '<body onunload="GUnload();" onload="GoogleMapLoad();">';
}
else {
echo '<body>';
}
shop_content.php //////////////////////////////////////////////////////
nach require (DIR_WS_INCLUDES.'header.php');
Zitat:
// Google

function nl2brStrict($text, $replacement = '<br />')
{
return preg_replace("((\r\n)+)", trim($replacement), $text);
}

$smarty->assign('GOOGLEMAP_KEY', nl2brStrict(GOOGLEMAP_KEY));
$smarty->assign('GOOGLEMAP_LNG', nl2brStrict(GOOGLEMAP_LNG));
$smarty->assign('GOOGLEMAP_ZOOM', nl2brStrict(GOOGLEMAP_ZOOM));
$smarty->assign('GOOGLEMAP_LAT', nl2brStrict(GOOGLEMAP_LAT));
$smarty->assign('STORE_NAME_ADDRESS', nl2brStrict(STORE_NAME_ADDRESS));
$smarty->assign('STORE_TELEPHONE', nl2brStrict(STORE_TELEPHONE));
templates/ihrtemplate/module/contact_us.html ///////////////////////////////////

Zitat:
<div id="map" style="width: 100%; height: 350px; border:solid black 1px;" ></div>
{literal}
<script src="http://maps.google.com/maps?file=api...P_KEY}{literal}"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function GoogleMapLoad()
{
if (GBrowserIsCompatible())
{
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng({/literal}{$GOOGLEMAP_LAT}{literal},{/literal} {$GOOGLEMAP_LNG}{literal}), {/literal}{$GOOGLEMAP_ZOOM}{literal});
map.addControl(new GMapTypeControl());
map.addControl(new GSmallMapControl());
var point = new GLatLng({/literal}{$GOOGLEMAP_LAT}{literal}, {/literal}{$GOOGLEMAP_LNG}{literal});
var infoTabs = [
new GInfoWindowTab("Address", "{/literal}{$STORE_NAME_ADDRESS}{literal}"),
new GInfoWindowTab("Telephone", "{/literal}{$STORE_TELEPHONE}{literal}")

];

var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() { marker.openInfoWindowTabsHtml(infoTabs);});
map.addOverlay(marker);
marker.openInfoWindowTabsHtml(infoTabs);
}
}
//]]>
</script>
{/literal}
datenbank /////////////////////////////////////////////////////////////
Zitat:
INSERT INTO `configuration` (`configuration_id`, `configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (516, 'GOOGLEMAP_KEY', 'xxxxxxxxxxxxxxxxx', 1, 18, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'NULL', NULL);
INSERT INTO `configuration` (`configuration_id`, `configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (517, 'GOOGLEMAP_LAT', 'xxxxxxxxxxxxx', 1, 18, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'NULL', NULL);
INSERT INTO `configuration` (`configuration_id`, `configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (518, 'GOOGLEMAP_LNG', 'xxxxxxxxxxxx', 1, 18, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'NULL', NULL);
INSERT INTO `configuration` (`configuration_id`, `configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (519, 'GOOGLEMAP_ZOOM', '14', 1, 18, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'NULL', NULL);
INSERT INTO `configuration` (`configuration_id`, `configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (520, 'GOOGLEMAP_MINIMAP', 'true', 1, 18, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'NULL', 'xtc_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` (`configuration_id`, `configuration_key`, `configuration_value`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (521, 'GOOGLEMAP_MAPCONTROL', 'none', 1, 18, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'NULL', 'xtc_cfg_select_option(array(''small'', ''large'',''none''),');
lang/admin/configuration.php /////////////////////////////////////////////////

Zitat:
define('GOOGLEMAP_KEY_TITLE' , 'Google Maps API Key');
define('GOOGLEMAP_KEY_DESC' , 'The Google Maps api key');
define('GOOGLEMAP_LAT_TITLE' , 'Google Maps API Latitude');
define('GOOGLEMAP_LAT_DESC' , 'enter your latitude (example 53.29811969600611)');
define('GOOGLEMAP_LNG_TITLE' , 'Google Maps API Longitude');
define('GOOGLEMAP_LNG_DESC' , 'enter your longitude (example -3.514702320098877)');
define('GOOGLEMAP_ZOOM_TITLE' , 'Zoom Level');
define('GOOGLEMAP_ZOOM_DESC' , 'enter your default zoom level');
define('GOOGLEMAP_MINIMAP_TITLE' , 'GoogleMap MiniMap');
define('GOOGLEMAP_MINIMAP_DESC' , 'Shows the minimap');
define('GOOGLEMAP_MAPCONTROL_TITLE' , 'Google Map Control');
define('GOOGLEMAP_MAPCONTROL_DESC' , 'Sets the size of the map controls');

Geändert von mzanier (02.06.2007 um 13:58 Uhr)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 15.03.2008, 18:35
xt:Commerce Support Kunde
 
Registriert seit: 26.01.2008
Beiträge: 15
Standard

datenbank tabellen lassen sich nicht erstellen irgend ein syntax ist verhaltet.

wo soll ...... define('GOOGLEMAP_KEY_TITLE' , 'Google Maps API Key');
define('GOOGLEMAP_KEY_DESC' , 'The Google Maps api key');
define('GOOGLEMAP_LAT_TITLE' , 'Google Maps API Latitude');
.....

eingefügt werden?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 17.03.2008, 11:28
Erfahrener Benutzer
 
Registriert seit: 14.03.2005
Beiträge: 159
Standard

Warum macht ihr euch das Leben den so schwer?
Ich hab auf unserem Shop auch die Map. Klar, API Key muss vorhanden sein. Sonst bin ich hingegangen, hab alles in ner html Datei fertig gemacht wie es aussehen soll, die dann in media/content/ rein fertig. Noch im Admin auswählen (Content manager) fertig ist das
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 22.01.2009, 14:22
Benutzerbild von back@me
Erfahrener Benutzer
 
Registriert seit: 13.10.2004
Beiträge: 317
Frage

Wie sieht es bei der Verwendung von Google Maps eigentlich mit dem Datenschutz gegenüber dem Kunden aus?

Google schreibt in seinen Richtlinien: "Ihr Service muss für alle Endanwender frei zugänglich sein ..."

Wie macht Ihr das denn?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
google, map

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Contribution: Google Sitemap Modul gswkaiser Admininterface 133 16.05.2009 16:14


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:02 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand