Hallo @ll,
vielleicht/hoffentlich könnt Ihr mir wieder mal weiterhelfen. Entweder, bin ich wieder Blind und seh nichts mehr, oder ich habe irgendetwas nicht richtig verstanden. Foldender GoogleMaps Skript, funktioniert nur in FF teilweise. Im IE und Opera wird rein gar nichts angezeigt
Wäre super, wenn ihr mir Hinweise geben könntet, wo ich mist gebaut habe? Im FF funktioniert es,selbst das lässt sich das Point selber nicht verschieben... geht das überhaupt? Wisst ihr, wie ich Polygone oder einen einfachen Kreis in die Map zeichnen könnte um einen bestimmten Radius um einen Punkt durchsuchen zu lassen?
(sprich, den Radius auslesen und in eine Variable im Dokument speichern)
lg,
Hugo
vielleicht/hoffentlich könnt Ihr mir wieder mal weiterhelfen. Entweder, bin ich wieder Blind und seh nichts mehr, oder ich habe irgendetwas nicht richtig verstanden. Foldender GoogleMaps Skript, funktioniert nur in FF teilweise. Im IE und Opera wird rein gar nichts angezeigt

Code:
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAseNjd0vCelWT-KoLbLJQdhRyTHkg_c7lbAmzj..."
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var map;
var geocoder;
// red marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
//icon.infoWindowAnchor = new GPoint(5, 1);
var marker=[];
var point=[];
var line=null;
var n=0;
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(48.143411,11.580276), 13);
//map.setZoom(13);
map.mapControl = new GMapTypeControl();
//map.addControl(new GMapTypeControl(1));
map.addControl(new GLargeMapControl());
map.addControl(new GScaleControl());
map.setMapType(G_HYBRID_MAP);
geocoder = new GClientGeocoder();
}
}
// addAddressToMap() is called when the geocoder returns an
// answer. It adds a marker to the map with an open info window
// showing the nicely formatted version of the address and the country code.
function addAddressToMap(response) {
map.clearOverlays();
if (!response || response.Status.code != 200) {
alert("Sorry, we were unable to geocode that address");
load();
} else {
place = response.Placemark[0];
point[n] = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
GUnload();
map = new GMap2(document.getElementById("map"));
start =new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
map.setCenter(start, 13);
map.addControl(new GMapTypeControl(1));
map.addControl(new GLargeMapControl());
map.addControl(new GScaleControl());
marker[n] = new GMarker(point[n], {icon:icon, draggable: true});
marker[n].disableDragging();
//GEvent.addListener(marker[n],'drag',function(){draw()});
map.addOverlay(marker[n]);
n++;
function() {
marker.openInfoWindowHtml(place.address + '<br>' +
'<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode);
}
document.forms[1].lon.value=place.Point.coordinates[1];
document.forms[1].lat.value=place.Point.coordinates[0];
}
}
// showLocation() is called when you click on the Search button
// in the form. It geocodes the address entered into the form
// and adds a marker to the map at that location.
function showLocation() {
marker=[];
point=[];
line=null;
n=0;
var address = document.forms[0].q.value;
geocoder.getLocations(address, addAddressToMap);
}
// findLocation() is used to enter the sample addresses into the form.
function findLocation(address) {
document.forms[0].q.value = address;
showLocation();
}
//]]>
</script>
Wäre super, wenn ihr mir Hinweise geben könntet, wo ich mist gebaut habe? Im FF funktioniert es,selbst das lässt sich das Point selber nicht verschieben... geht das überhaupt? Wisst ihr, wie ich Polygone oder einen einfachen Kreis in die Map zeichnen könnte um einen bestimmten Radius um einen Punkt durchsuchen zu lassen?

(sprich, den Radius auslesen und in eine Variable im Dokument speichern)
lg,
Hugo