Advertisement
Guest User

Untitled

a guest
Sep 29th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         updateSaveWidget: function (place) {
  2.  
  3.  
  4.             var saveWidgetOptions = {
  5.                 place: {
  6.                     placeId: place.get('place_id'),
  7.                     location: {lat: place.get('lat'), lng: place.get('lng')}
  8.                 },
  9.                 attribution: {
  10.                     source: 'The New York Times',
  11.                     webUrl: 'http://paidpost.nytimes.com'
  12.                 }
  13.             };
  14.  
  15.             // lazy init the save Widget
  16.             if (! this.saveWidget) {
  17.                 this.saveWidget = new google.maps.SaveWidget(document.getElementById('place-save-widget'), saveWidgetOptions);
  18.             } else {
  19.                 // update an existing save widget
  20.                 this.saveWidget.setOptions(saveWidgetOptions);
  21.             }
  22.  
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement