28 cze 2010

Przygotownie boxa w obrębie punktu

var marker = new GMarker(point,{title: address});
map.addOverlay(marker);

boxes=[];
boxes[0]=
new google.maps.LatLngBounds(
new google.maps.LatLng(point.lat()-dist*0.01,point.lng()-dist*0.02),
new google.maps.LatLng(point.lat()+dist*0.01,point.lng()+dist*0.02)
);
19 sty 2009

Dodanie przesuwalnego markera

var color = "red";
var f = new GIcon();
f.image = "http://labs.google.com/ridefinder/images/mm_20" + color + ".png";
f.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
f.iconSize = new GSize(12, 20);
f.shadowSize = new GSize(22, 20);
f.iconAnchor = new GPoint(6, 20);
f.infoWindowAnchor = new GPoint(6, 1);
f.infoShadowAnchor = new GPoint(13, 13);

newMarker = new GMarker(point,
  { icon: f, draggable: true }
);