Skip to content

Instantly share code, notes, and snippets.

@norcali
Created July 17, 2013 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norcali/6024254 to your computer and use it in GitHub Desktop.
Save norcali/6024254 to your computer and use it in GitHub Desktop.
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
$(document).ready(function(){
$.getJSON("provincias.json", function(data) {
//console.log(data);
//var json = $.parseJSON(data);
var json = jQuery.parseJSON(data);
if(google.loader.ClientLocation)
{
visitor_lat = google.loader.ClientLocation.latitude;
visitor_lon = google.loader.ClientLocation.longitude;
visitor_city = google.loader.ClientLocation.address.city;
visitor_region = google.loader.ClientLocation.address.region;
visitor_country = google.loader.ClientLocation.address.country;
visitor_countrycode = google.loader.ClientLocation.address.country_code;
//codigo = funcionloca();
console.log(json);
$('#iframeclima').html('<iframe width="100%" height="1550" src="http://dac.labpress.com.ar/cities/"'+ codigo +'".html"></iframe>');
}
else
{
$('#iframeclima').html('<iframe width="100%" height="1550" src="http://dac.labpress.com.ar/cities/SABE.html"></iframe>');
}
});
});
</script>
<span id="iframeclima"></span>
<!-- <iframe width="100%" height="1550" src="http://dac.labpress.com.ar/cities/SABE.html"></iframe> -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment