witam !
co jest źle w tym kodzie?
var test1 = "(" + nelat + ", " + nelng + ")";
var test2 = "(" + swlat + ", " + swlng + ")";
//alert(test1); wynik -> (50.355089589491605, 25.734125341796926)
//alert(test2); wynik -> (49.467221440947704, 23.806024755859426)
var granice = new google.maps.LatLngBounds(test1, test2);
function mapaStart() {
var wspolrzedne = new google.maps.LatLng(c1, c2);
var opcjeMapy = {
zoom: 6,
center: wspolrzedne,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapka"), opcjeMapy);
map.fitBounds(granice);
Powinno za pomocą metody fitBounds ładnie ustawić granice, które zbudowałem. Lecz kod wyrzuca błąd
Błąd: a.lat is not a function
Plik źródłowy: http://maps.gstatic.com/intl/pl_ALL/mapfiles/api-3/9/8/main.js
Wiersz: 13
Co jest nie tak?
pozdrawiam!