@contentpilot/google-maps
Advanced tools
Comparing version 1.0.3 to 1.1.0
25
index.js
@@ -16,3 +16,3 @@ /** | ||
var settings = $.extend( | ||
const settings = $.extend( | ||
{ | ||
@@ -39,11 +39,10 @@ zoom: 15, | ||
function init() { | ||
var container = data.container ? data.container : 'google-maps'; | ||
var street = data.street; | ||
var suite = data.suite; | ||
var city = data.city; | ||
var state = data.state; | ||
var postal = data.zip; | ||
var country = data.country; | ||
const container = data.container ? data.container : 'google-maps'; | ||
const street = data.street; | ||
const city = data.city; | ||
const state = data.state; | ||
const postal = data.zip; | ||
const country = data.country; | ||
var address = | ||
let address = | ||
street + | ||
@@ -59,3 +58,5 @@ ', ' + | ||
var map = new google.maps.Map( | ||
address = address.replace(/,\s*$/, ""); | ||
const map = new google.maps.Map( | ||
document.getElementById( container ), | ||
@@ -65,3 +66,3 @@ settings | ||
var geocoder = new google.maps.Geocoder(); | ||
const geocoder = new google.maps.Geocoder(); | ||
@@ -71,3 +72,3 @@ if ( geocoder ) { | ||
{ | ||
address: street, | ||
address: address, | ||
}, | ||
@@ -74,0 +75,0 @@ function ( results, status ) { |
{ | ||
"name": "@contentpilot/google-maps", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "JS used to display interactive Google Map with authenticated API key.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5026