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
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
unless defined?(ActiveSupport::JSON) | |
begin | |
require 'rubygems' # for Ruby 1.8 | |
require 'json' | |
rescue LoadError | |
raise LoadError, "Please install the 'json' or 'json_pure' gem to parse geocoder results." |
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
GMaps = function(options){ | |
this.div = $(options.div)[0]; | |
this.markers = []; | |
this.polygon = null; | |
this.infoWindow = null; | |
this.map = new google.maps.Map(this.div, { | |
zoom: 15, | |
center: new google.maps.LatLng(options.lat, options.lng), | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}); |
NewerOlder