It appears map.controls[google.maps.ControlPosition.BOTTOM].push(koordinatenDiv);
is a asyn call, which means the coordinate div is not attached to DOM immediately after the call. I did a quick check on the reference and there is no event specify the control is available, so your workaround would be passing the init latlng into the constructor of the control and assign it's innerHTML value after you create the DIV, that should work. On Jun 24, 6:54 pm, Harald Effenberg <[email protected]> wrote: > Hi! > > I want to changehttp://www.effenberg.de/mapsfrom V2 to V3. > > Onhttp://www.effenberg.de/maps-v3-1there is a DIV with the ID > "coordinates" in the center of the bottom which should display > latitude and longitude. > It works well when you click somewhere into the map. > But it should display the coordinates of the center of the map already > at the start - no matter, if I start it at it's > "home-position"http://www.effenberg.de/maps-v3-1.htm > or with geocoding likehttp://www.effenberg.de/maps-v3-1.htm?mainstreet > (just likehttp://www.effenberg.de/mapsdoes) > > So I wrote > > document.getElementById("coordinates").innerHTML = > zentrum.toUrlValue(6); > > into line 197. > But nothing happens. > > I've been trying and testing the whole evening and now I think that I > need some help. Can somebody please tell me what's wrong? Thank you. > > Best regards > Harry -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
