gracias por tu paciencia, ahora me encuentro con un warning jijijiji poco a poco, al parece carga el mapa varias veces y crea coinflicto, estube mirando en san google pero no encontre nada al respecto que me fuera util
Código:
Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors.
te dejo mi codigo tal cual lo tengo
Código:
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBb2----------------------------------------Npcs&sensor=true"></script>
<script type="text/javascript">
var map;
var service;
var infowindow;
function initialize() {
var pyrmont = new google.maps.LatLng(39.300299,-3.825073);
map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: pyrmont,
zoom: 6
});
var request = {
location: pyrmont,
radius: '5000',
query: 'tienda muebles'
};
infowindow = new google.maps.InfoWindow();
var service = new google.maps.places.PlacesService(map);
service.textSearch(request, function(results, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
for (var i = 0; i < results.length; i++) {
createMarker(results[i]);
}
}
});
}
function createMarker(placeMarker) {
var marker = new google.maps.Marker({
map: map,
position: placeMarker.geometry.location
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent(placeMarker.name);
infowindow.open(map, this);
});
}
</script>
</head>
<body onload="initialize()">
<div id="map" style="width:650px; height:650px"></div>
</body>
</html>