Código:
este mi codigo, habe si ven algo estraño, muchas gracias de antemano:TypeError: google.maps.places is undefined var service = new google.maps.places.PlacesService(map);
Código Javascript:
Ver original
<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="https://maps.googleapis.com/maps/api/js?key=AIzaSyB------xLQJ----cs&sensor=false"> </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, query: 'tienda muebles' }; var service = new google.maps.places.PlacesService(map); service.textSearch(request, callback); } function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i < results.length; i++) { var place = results[i]; createMarker(results[i]); } } } </script> </head> <body onload="initialize()"> <div id="map" style="width:650px; height:650px"></div> </body> </html>