Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/05/2013, 08:16
jamarchi
 
Fecha de Ingreso: febrero-2005
Mensajes: 12
Antigüedad: 19 años, 3 meses
Puntos: 0
Problemas con el Google Weather

Hola amigos

Tengo la siguiente situación, necesito poner en una pagina web el clima de una ciudad, el codigo que tengo de google weather funciona de maravilla, el problema es que ese codigo utilizar Latitud y Longitud y yo la información que tengo es solo la ciudad como puedo hacer para que es código me sirva pero con ciudad en vez Latitud y Longitud

Gracias por la ayuda

Este es el código que tengo
Código:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Weather layer</title>
    <link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" rel="stylesheet">
    <script src="https://maps.google.com/maps/api/js?v=3.exp&sensor=false&libraries=weather"></script>
	
    <script>
function initialize() {
  var mapOptions = {
  
    zoom: 6,
    center: new google.maps.LatLng(49.265984,-123.127491),
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };

  var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

  var weatherLayer = new google.maps.weather.WeatherLayer({
    temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT
  });
  weatherLayer.setMap(map);

  var cloudLayer = new google.maps.weather.CloudLayer();
  cloudLayer.setMap(map);
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>
  </head>
  <body>
    <div id="map-canvas"></div>
  </body>
</html>