Skip to content

Instantly share code, notes, and snippets.

@dirceu-jr
Created July 13, 2009 23:44
Show Gist options
  • Save dirceu-jr/146532 to your computer and use it in GitHub Desktop.
Save dirceu-jr/146532 to your computer and use it in GitHub Desktop.
<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