hi
i have widget to add differents pages
class ObiektyWidget extends Widget{
static $title = "";
static $cmsTitle = "Select object";
static $description = "";
static $db = array(
"ObiektID" => "Varchar"
);
function getCMSFields(){
return new FieldSet(
new SimpleTreeDropdownField('ObiektID','Select object:')
);
}
function Objects(){
$object = DataObject::get_by_id("SiteTree",$this->ObiektID);
return $object;
}
}
in widget template
<% control Objects %>
var marker = new GMarker(new GLatLng($Lat,$Lng),{title: "$Title"});
mapa.addOverlay(marker);
GEvent.addListener(marker,"click",function() {
marker.openInfoWindowHtml('<div class="dymek"><h2>$Title</h2><% control Zdjecie %><% control CroppedImage(90,50) %><img title="" src="$URL" width="90" height="50" style="float: left; margin-right: 5px;" /><% end_control %><% end_control %><p>$Zajawka</p><p><a href="$Link">przeczytaj opis</a></p></div>');
});
<% end_control %>
and everythig is ok
on my google maps i have all markers (object pages)
but when i click on marker window opens on last object (last widget in CMS) not on clicked
any idea how correct this problem ?