sascha_kote
Threadersteller
Dabei seit: 18.10.2007
Ort: Münster
Alter: -
Geschlecht:
|
Verfasst Do 02.07.2015 11:41
Titel Map Marker mit Sidebar |
 |
|
Ich möchte den Map Marker hier nutzen (Maps & Sidebar)
http://koti.mbnet.fi/ojalesa/boundsbox/makemarker_sidebar.htm
Mein Problem ist, dass ich statt der Sidebar ein Dropdown brauche, aber nicht wirklich weiss, wo ich dan ansetzen muss.
Jemand nen Tipp?
Danke Sascha
/**
* Creates a sidebar item
* @constructor
* @author Esa 2009
* @param marker
* @param options object Supported properties: sidebarItem, sidebarItemClassName, sidebarItemWidth,
*/
function SidebarItem(marker, opts){
var tag = opts.sidebarItemType || "button";
var row = document.createElement(tag);
row.innerHTML = opts.sidebarItem;
row.className = opts.sidebarItemClassName || "sidebar_item";
row.style.display = "block";
row.style.width = opts.sidebarItemWidth || "120px";
row.onclick = function(){
google.maps.event.trigger(marker, 'click');
}
row.onmouseover = function(){
google.maps.event.trigger(marker, 'mouseover');
}
row.onmouseout = function(){
google.maps.event.trigger(marker, 'mouseout');
}
this.button = row;
}
// adds a sidebar item to a
SidebarItem.prototype.addIn = function(block){
if(block && block.nodeType == 1)this.div = block;
else
this.div = document.getElementById(block)
|| document.getElementById("sidebar")
|| document.getElementsByTagName("body")[0];
this.div.appendChild(this.button);
}
// deletes a sidebar item
SidebarItem.prototype.remove = function(){
if(!this.div) return false;
this.div.removeChild(this.button);
return true;
}
|
|