Skip to content

Commit

Permalink
Fixup: Add comment explaining dependency on Google Maps API for Viewf…
Browse files Browse the repository at this point in the history
…inderView
  • Loading branch information
ianguerin committed Mar 21, 2024
1 parent 8186f78 commit 064bae5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/js/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ define(['jquery', 'underscore', 'backbone'],
* Your Google Maps API key, which is used to display interactive maps on the search
* views and static maps on dataset landing pages.
* If a Google Maps API key is not specified, the maps will be omitted from the interface.
* The Google Maps API key also controls the showViewfinder feature on a Map
* and should have the Geocoding API and Places API enabled in order to
* function properly.
* Sign up for Google Maps services at https://console.developers.google.com/
* @type {string}
* @example "AIzaSyCYyHnbIokUEpMx5M61ButwgNGX8fIHUs"
Expand Down
4 changes: 3 additions & 1 deletion src/js/models/maps/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ define([
* @property {Boolean} [showHomeButton=true] - Whether or not to show the
* home button in the toolbar.
* @property {Boolean} [showViewfinder=false] - Whether or not to show the
* viefinder UI and viewfinder button in the toolbar.
* viefinder UI and viewfinder button in the toolbar. The ViewfinderView
* requires a Google Maps API key present in the AppModel. In order to
* work properly the Geocoding API and Places API must be enabled.
* @property {Boolean} [toolbarOpen=false] - Whether or not the toolbar is
* open when the map is initialized. Set to false by default, so that the
* toolbar is hidden by default.
Expand Down
2 changes: 2 additions & 0 deletions src/js/views/maps/viewfinder/ViewfinderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ define(
* @classdesc ViewfinderView allows a user to search for
* a latitude and longitude in the map view, and find suggestions
* for places related to their search terms.
* This view requires a Google Maps API key in order to function properly,
* and must have the Geocoding API and Places API enabled.
* @classcategory Views/Maps
* @name ViewfinderView
* @extends Backbone.View
Expand Down

0 comments on commit 064bae5

Please sign in to comment.