Skocz do zawartości

mapa miasta na stronie www

Featured Replies

  • Odpowiedzi 6
  • Wyświetleń 1,5k
  • Created
  • Ostatniej odpowiedzi

Top Posters In This Topic

Napisano

wejdziesz sobie w zrodla tej stronki to zobaczysz jak!:P

 

//

 

function load() {

if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));

map.addControl(new GSmallMapControl());

map.addControl(new GMapTypeControl());

map.setCenter(new GLatLng(50.294247+0.008034, 18.665557+0.016462), 15);

 

 

// Creates a marker at the given point with the given number label

function createMarker(point, number) {

var marker = new GMarker(point);

GEvent.addListener(marker, "click", function() {

marker.openInfoWindowHtml("MASTERBUD

44-100 Gliwice, ul. Tarnogórska 20");

});

return marker;

}

 

// Add 10 markers to the map at random locations

var bounds = map.getBounds();

var southWest = bounds.getSouthWest();

var northEast = bounds.getNorthEast();

//var lngSpan = northEast.lng() - southWest.lng();

//var latSpan = northEast.lat() - southWest.lat();

//for (var i = 0; i

var point = new GLatLng(southWest.lat() +0.004534,

southWest.lng() +0.010692 );

map.addOverlay(createMarker(point, 1));

//}

 

 

 

}

}

 

 

 

//]]>

Napisano
  • Autor

sobie weszlam i probowalam to obczaic, ale jakos to do mnie nie przemawia i prawde mowiac nie wiem, co z tym zrobic :)

Napisano

Ta mapka to poprostu gotowy skrypt odwołujący się do Google maps czy jakoś tak. Pogrzeb po servisach googli musi tam pisac jak cos takiego wstawic. Będziesz musiała też pogrzebać w tym

 

function load() {

if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));

map.addControl(new GSmallMapControl());

map.addControl(new GMapTypeControl());

map.setCenter(new GLatLng(50.294247+0.008034, 18.665557+0.016462), 15);

 

 

// Creates a marker at the given point with the given number label

function createMarker(point, number) {

var marker = new GMarker(point);

GEvent.addListener(marker, "click", function() {

marker.openInfoWindowHtml("MASTERBUD

44-100 Gliwice, ul. Tarnogórska 20");

});

return marker;

}

 

W tych parametrach masz ustawiane gdzie ma się centrować mapa, oraz gdzie i jak opisany będzie ten "dzyndzelek" :)

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Powiadomienie o plikach cookie

Wykorzystujemy cookies. Przeczytaj więcej Polityka prywatności Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.

Account

Navigation

Szukaj

Szukaj

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.