This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fabconf.py | |
import os | |
import time | |
from fabric.api import * | |
from fabric.contrib import django | |
django.settings_module('mostlymeta.settings') | |
from django.conf import settings | |
env.fab_root = os.path.dirname(__file__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('#example5').locationField().bind('location_updated', function(e, location){ | |
$('#example5_city').val(location.city); | |
$('#example5_state').val(location.state); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('#example4').locationField(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($){ | |
var locations = [{"country":"CA","longitude":"-67.13060000","city":"Campbell Settlement York Co","latitude":"45.96670000","state":"NB"},{"country":"CA","longitude":"-79.33730000","city":"East York","latitude":"43.72940000","state":"ON"},{"country":"US","longitude":"-76.67785000","city":"East York","latitude":"39.97689800","state":"PA"},{"country":"CA","longitude":"-66.68430000","city":"French Village-York","latitude":"45.96390000","state":"NB"},{"country":"CA","longitude":"-67.00120000","city":"Harvey York Co","latitude":"45.73070000","state":"NB"},{"country":"CA","longitude":"-67.55970000","city":"Johnson Settlement York Co","latitude":"46.16470000","state":"NB"},{"country":"US","longitude":"-90.75393000","city":"Little York","latitude":"41.01066600","state":"IL"},{"country":"US","longitude":"-85.90405000","city":"Little York","latitude":"38.70052300","state":"IN"},{"country":"US","longitude":"-73.99653000","city":"New York","latitude":"40.75074200","state":"NY"},{"country":"US","longitude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
var update_example3 = function(location) { | |
if (location) { | |
address = location.city + ", " + location.state + ", " + location.country; | |
if (!locations[address]) { | |
locations[address] = location; | |
} | |
$('#example3').val(address); | |
} | |
validate_example3(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('#example2').bind('blur change', function(){ | |
var $this = $(this); | |
geocode_address($this.val(), function(location){ | |
if (location.formatted_address) { | |
$this.val(location.formatted_address); | |
$('#example2_city').val(location.city); | |
$('#example2_state').val(location.state); | |
} else { | |
$this.addClass('error'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$('#example1').bind('blur change', function(){ | |
var $this = $(this); | |
geocode_address($this.val(), function(location){ | |
if (location.formatted_address) { | |
$this.val(location.formatted_address); | |
$this.removeClass('error'); | |
} else { | |
$this.addClass('error'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geocoder, | |
geocode_address, | |
geocoded_addresses = {}, | |
location_type = { | |
administrative_area_level_1: 'state', | |
administrative_area_level_2: 'municipality', | |
locality: 'city', | |
country: 'country', | |
postal_code: 'postal_code', | |
street_number: 'street_number', |