Created
July 13, 2009 23:44
-
-
Save dirceu-jr/146532 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>Casa para locação em Londrina</title> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
var geocoder; | |
var map; | |
var latlng = new google.maps.LatLng(-23.327754771531193, -51.17114067077637); | |
var myOptions = { | |
zoom: 13, | |
center: latlng, | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
} | |
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); | |
$(['imobiliariainglaterra', 'imobiliariaatual', 'imobiliariadelta', 'imobiliariaavenida', 'ihimoveis', 'imobiliariasenador', 'imobiliariaperez']).each(function() { | |
$.getJSON(['http://localhost:4567/', this, '?callback=?'].join(''), function(data) { | |
for (add in data) { | |
setTimeout(function(data) { | |
var myLatlng = new google.maps.LatLng(data['geo'][0],data['geo'][1]); | |
var infowindow = new google.maps.InfoWindow({ | |
content: ['<a href="', data['link'], '">Mais detalhes</a>'].join('') | |
}); | |
var marker = new google.maps.Marker({ | |
position: myLatlng, | |
map: map | |
}); | |
google.maps.event.addListener(marker, 'click', function() { | |
infowindow.open(map,marker); | |
}); | |
}, 100*add, data[add]); | |
} | |
}); | |
}); | |
}); | |
</script> | |
</head> | |
<body style="margin:0px; padding:0px;"> | |
<div id="map_canvas" style="width:100%; height:100%"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment