Skip to content

Instantly share code, notes, and snippets.

@norcali norcali/gist:6024254
Created Jul 17, 2013

Embed
What would you like to do?
<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
You can’t perform that action at this time.