0
Guys, I had to swap the google map for Bing’s, and now I can’t make clicking the marker open an infobox. The event is called, and it arrow the settings but simply does not appear... When I add a marker to the map, or several works, when I manipulate anything works, except when opening the infobox... Could someone help me?
I will show the properties and the two functions that do not do what should... I’ve even tried to use the function q I saw in a reply has the hideInfobox,display info box and tbm did not appear....
var config = {
map: undefined,
infobox: undefined,
latlng: undefined,
marcador: undefined,
carregado: false
}
function MapearImoveis(position, imovel, icone) {
//faz umas coisas aq...........
Microsoft.Maps.Events.addHandler(config.marcador, 'click', function (event) {
abrirInfobox(imovel, event); //chama quando clico
});
config.map.entities.push(config.marcador);
}
function abrirInfobox(imovel, marcador) {
var info = $("#info");
//crio o html q vai no infobox
...
//
config.infobox = new Microsoft.Maps.Infobox(marcador.location, { visible: true });
config.infobox.setHtmlContent(info.html());
config.map.entities.push(config.infobox);
document.getElementById("infoFoto").onerror = function (e) {
e.target.src = "../Content/imagens/imovel_sem_imagem.jpg";
}
}