var referencia = [
['-25.0866871786198', '-50.1610207557678', 'UEPG Campus Central', ''],
['-25.0898936662246', '-50.1056170463562', 'UEPG Campus Uvaranas', ''],
['-25.1010088393824', '-50.1569867134094', 'Faculdade União', ''],
['-25.0928474471231', '-50.1227831840515', 'Cescage Uvaranas', ''],
['-25.097239121101', '-50.1366877555847', 'Cescage Campus Olarias', ''],
['-25.0977249160603', '-50.162501335144', 'Faculdade Secal', ''],
['-25.0957428605049', '-50.1686596870422', 'Rodoviária', ''],
['-25.0944020400078', '-50.1558494567871', 'Terminal Central', ''],
['-25.0816343609983', '-50.186448097229', 'Terminal Nova Rússia', ''],
['-25.0917786530568', '-50.1150155067444', 'Terminal Uvaranas', ''],
['-25.1258394400312', '-50.1531672477722', 'Terminal Oficinas', ''],
['-25.0944797691335', '-50.1518154144287', 'Shopping Palladium', ''],
['-25.0857543664508', '-50.1784229278564', 'Shopping Total / Super Muffato', ''],
['-25.0941105553466', '-50.1574373245239', 'Supermercado Condor', ''],
['-25.0941105553466', '-50.1574373245239', 'Supermercado Condor', ''],
['-25.0904183561974', '-50.1702046394348', 'Supermercado Condor - Nova Rússia', ''],
['-25.1052642064931', '-50.1590037345886', 'Super Muffato - Oficinas', ''],
['-25.0727719925911', '-50.1517295837402', 'Supermercado Tozetto - Jd Carvalho', ''],
['-25.1059054133576', '-50.1610636711121', 'Supermercado Tozetto Vila Estrela', ''],
[]
];
function marcadores()
{
var marks = new Array();
var imovel = new GLatLng(latitude, longitude);
for(i=0;i<(referencia.length-1);i++)
{
//Carrega os pontos de referencia
var point = new GLatLng(referencia[i][0], referencia[i][1]);
marks[i] = new GMarker(point);
marks[i].arrayPosition = i;
//Informações sobre rotas
var query = 'from: '+imovel.toUrlValue()+' to: '+point.toUrlValue(); //Exemplo: from: -25.097783,-50.161793 to: -25.097278,-50.157571
var gdir = new GDirections();
gdir.load(query, {"location": "pt_BR"});
gdir.marcador = marks[i];
GEvent.addListener(gdir, "load", function(){
this.marcador.distance = this.getDistance().html;
this.marcador.duration = this.getDuration().html;
});
GEvent.addListener(marks[i], "mouseover", function() {
var html = ''+referencia[this.arrayPosition][2]+'';
html += (this.distance != undefined)?'
A '+this.distance+' do imóvel.':'';
html += (this.duration != undefined)?'
'+this.duration+' de carro.':'';
this.openInfoWindowHtml(html);
});
GEvent.addListener(marks[i], "mouseout", function() {
this.closeInfoWindow();
});
}
return marks;
}