Hallo!
ich habe ein Problem bei dem ich mittlerweile am verzweifeln bin. Ich habe die ext. wec_map installiert um eine Google Map auf der Webseite einzublenden. Leider wird die Karte nicht geladen. das Div bleibt leer!
weder die simple map noch die table map mit den koordinaten aus tt_adress werden angezeigt.
alle stylesheets habe ich auch mal testweise rausgenommen, jedoch ohne erfolg. ich weiss nun nicht mehr was ich noch tun kann um den fehler zu finden.
Der API Key funktioniert, da ich den Testcode von google auf den server geladen habe und dort wird die karte angezeigt.
bin für jeden hinweis dankbar!
T3 Version: 4.2.1 + TV
wec_map 2.2.0
hier ist der code den die extension generiert:
<div class="tx-wecmap-pi3">
<table><tr><td><div id="map420" class="tx-wecmap-map" style="width:400px; height:400px;"></div><script type="text/javascript">
/*<![CDATA[*/
var map420;
var markers_map420 = [];
var markerContent_map420 = [];
var markerTabs_map420 = [];
var map420_to_arr = [];
var map420_from_arr = [];
function toHere_map420(groupid, id) {
tabs = [];
tabLabels = markerTabs_map420[groupid][id];
text = markerContent_map420[groupid][id];
dirs = map420_to_arr[groupid][id];
for (var i=0; i < text.length; i++) {
if(i==0) {
tabs.push(new GInfoWindowTab(tabLabels[i], dirs));
} else {
tabs.push(new GInfoWindowTab(tabLabels[i], text[i]));
}
};
markers_map420[groupid][id].openInfoWindowTabsHtml(tabs);
}
function fromHere_map420(groupid, id) {
tabs = [];
tabLabels = markerTabs_map420[groupid][id];
text = markerContent_map420[groupid][id];
dirs = map420_from_arr[groupid][id];
for (var i=0; i < text.length; i++) {
if(i==0) {
tabs.push(new GInfoWindowTab(tabLabels[i], dirs));
} else {
tabs.push(new GInfoWindowTab(tabLabels[i], text[i]));
}
};
markers_map420[groupid][id].openInfoWindowTabsHtml(tabs);
}
function setDirections_map420(fromAddress, toAddress, mapName) {
window["gdir_"+mapName].load("from: " + fromAddress + " to: " + toAddress, {locale: "en"});
map420.closeInfoWindow();
}
function map420_createMarker(id, point, icon, dir_title, groupid, address) {
var marker = new GMarker(point, icon);
var tabs = [];
var tabLabels = markerTabs_map420[groupid][id];
var text = markerContent_map420[groupid][id];
if(text){
for (var i=0; i < text.length; i++) {
tabs.push(new GInfoWindowTab(tabLabels[i], text[i]));
}; if(dir_title) {
if(!(map420_to_arr[groupid] instanceof Array)) map420_to_arr[groupid] = [];
map420_to_arr[groupid][id] = text[0];
map420_to_arr[groupid][id] += '<br /><div id="map420_todirform_'+groupid+'_'+id+'" class="todirform"><form action="#" onsubmit="setDirections_map420(document.getElementById(\'tx-wecmap-directions-from-map420\').value, \'' + point.y + ', ' + point.x + ' ('+ dir_title +')\', \'map420\'); return false;">';
map420_to_arr[groupid][id] += '<label class="startendaddress" for="tx-wecmap-directions-from-map420">Start Addresse</label><input type="text" name="saddr" value="'+ address +'" id="tx-wecmap-directions-from-map420" />';
map420_to_arr[groupid][id] += '<input type="submit" name="submit" value="Go" /></form></div>';
if(!(map420_from_arr[groupid] instanceof Array)) map420_from_arr[groupid] = [];
map420_from_arr[groupid][id] = text[0];
map420_from_arr[groupid][id] += '<br /><div id="map420_fromdirform_'+groupid+'_'+id+'" class="" fromdirform=""><form action="#" onsubmit="setDirections_map420( \'' + point.y + ', ' + point.x + ' ('+ dir_title +')\', document.getElementById(\'tx-wecmap-directions-to-map420\').value, \'map420\'); return false;">';
map420_from_arr[groupid][id] += '<label class="startendaddress" for="tx-wecmap-directions-to-map420">Ziel Addresse</label><input type="text" name="daddr" value="'+ address +'" id="tx-wecmap-directions-to-map420" />';
map420_from_arr[groupid][id] += '<input type="submit" name="submit" value="Go" /></form></div>';
}
marker.bindInfoWindowTabsHtml(tabs);
}
return marker;
}
function map420_triggerMarker(group, id, zoom) {
marker = markers_map420[group][id];
map420.setZoom(zoom);
map420.panTo(marker.getPoint());
setTimeout("GEvent.trigger(marker, 'click')",300);
}
function handleErrors_map420() {
if (gdir_map420.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: " + gdir_map420.getStatus().code);
else if (gdir_map420.getStatus().code == G_GEO_SERVER_ERROR)
alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: " + gdir_map420.getStatus().code);
else if (gdir_map420.getStatus().code == G_GEO_MISSING_QUERY)
alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: " + gdir_map420.getStatus().code);
else if (gdir_map420.getStatus().code == G_GEO_UNAVAILABLE_ADDRESS)
alert("The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual reasons.\n Error code: " + gdir_map420.getStatus().code);
else if (gdir_map420.getStatus().code == G_GEO_BAD_KEY)
alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: " + gdir_map420.getStatus().code);
else if (gdir_map420.getStatus().code == G_GEO_UNKNOWN_DIRECTIONS)
alert("We could not compute directions between the addresses. This is usually because there is no route available between the two points, or because we do not have data for routing in that region. \n Error code: " + gdir_map420.getStatus().code);
else if (gdir_map420.getStatus().code == G_GEO_BAD_REQUEST)
alert("A directions request could not be successfully parsed.\n Error code: " + gdir_map420.getStatus().code);
else alert("An unknown error occurred. Error code: " + gdir_map420.getStatus().code);
}
function drawMap_map420() {
if (GBrowserIsCompatible()) {
map420 = new GMap2(document.getElementById("map420"));
gdir_map420 = new GDirections(map420, document.getElementById("map420_directions"));GEvent.addListener(gdir_map420, "error", handleErrors_map420);
map420.setCenter(new GLatLng(50.187458, 8.665952), 15, G_HYBRID_MAP);
map420.addControl(new GSmallMapControl());
map420.addControl(new GScaleControl());
map420.addControl(new GOverviewMapControl());
map420.addMapType(G_PHYSICAL_MAP);
map420.addControl(new GHierarchicalMapTypeControl());
var icon_map420 = new GIcon();
icon_map420.image = "typo3conf/ext/wec_map/images/mm_20_red.png";
icon_map420.shadow = "typo3conf/ext/wec_map/images/mm_20_shadow.png";
icon_map420.iconSize = new GSize(12, 20);
icon_map420.shadowSize = new GSize(22, 20);
icon_map420.iconAnchor = new GPoint(6, 20);
icon_map420.infoWindowAnchor = new GPoint(5, 1);
var mgr_map420 = new GMarkerManager(map420);
markers_map420[0] = [];
markerContent_map420[0] = [];
markerTabs_map420[0] = [];
markerContent_map420[0][0] = [];
markerTabs_map420[0][0] = [];
markerContent_map420[0][0].push('<div id="map420_marker_0_0" class="marker"><div class="\" infotitle="">, Frankfurter Hof</div><div>Oskar-Schindler-Strasse 5<br />Frankfurt, Hessen 60437</div></div><br /><div id="map420_dirmenu_0_0" class="dirmenu" style="white-space: nowrap;">Wegbeschreibung: <a href="#" onclick="toHere_map420(0,0); return false;">Hierhin</a> - <a href="#" onclick="fromHere_map420(0,0); return false;">Von hier</a></div>');
markerTabs_map420[0][0].push('Adresse');
markers_map420[0].push(map420_createMarker(0, new GLatLng(50.187958,8.665452), icon_map420, ', Frankfurter Hof', 0, ''));
mgr_map420.addMarkers(markers_map420[0], 0, 17);
mgr_map420.refresh();
} }
/*]]>*/
</script></td><td style="vertical-align: top;"><div id="map420_sidebar" class="sidebar" style="height:400px"><a href="#" style="display:block;" onclick="map420_triggerMarker(0, 0, 14); return false;"><div class="infotitle">, Frankfurter Hof</div></a></div></td></tr></table><div id="map420_directions"></div><table><form action="index.php?id=189&no_cache=1" id="a2f8807d1026b1f28e99ec25cf4316d22" name="a2f8807d1026b1f28e99ec25cf4316d22" enctype="multipart/form-data" method="post"><div style="display:none;"></div><tr><td>Radius:</td><td> <select name="map420_radius" size="1"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option><option value="250">250</option></select> </td></tr><tr><td>Unit:</td><td> <select name="map420_kilometers" size="1"><option value="0" selected="selected">miles</option><option value="1">kilometers</option></select> </td></tr><tr><td>Address:</td><td> <input type="text" name="map420_address" size="20" value="" /> </td></tr><tr><td>City:</td><td> <input type="text" name="map420_city" size="20" value="" /> </td></tr><tr><td>State:</td><td> <input type="text" name="map420_state" size="20" value="" /> </td></tr><tr><td>ZIP:</td><td> <input type="text" name="map420_zip" size="20" value="" /> </td></tr><tr><td></td><td> <input type="submit" name="map420_submit" value="Submit" /> </td></tr></form></table>
</div>
[/img]
