});
anchor.observe('click', clickhandler(item.boundingbox));
+ Element.text(anchor, item.display_name);
- var text = document.createTextNode(item.display_name);
var icon = new Element("img", {
className: "nominatim-suggestions-icon",
src: item.icon || 'icons/world.png'
});
- anchor.appendChild(text); // insert does not work; see prototype #1125
li.insert(icon).insert(anchor);
$("nominatim-suggestions-list").insert(li);
if ($("nominatim-suggestions-list").childNodes.length >= 6) {
if ($("nominatim-suggestions-list").childNodes.length > 1) {
var bottomOffset = $('data_controls').measure('height') + 3;
$("nominatim-suggestions").setStyle({
- bottom: bottomOffset.toString() + 'px'
+ bottom: (document.viewport.getHeight() - $('data_controls').cumulativeOffset().top + 3).toString() + 'px'
}).show();
$("nominatim-suggestions-list").select("li:first-child")[0].addClassName('current');
} else {