Google recently made it a requirement that any application using their Google Maps Javascript API must have an API key. This means you need to create an API key in order to use any of the mapping components in farmOS.
Document how to do that:
1. Generate a Browser Key: https://console.developers.google.com/apis/credentials
2. Enable Google Maps Javascript API: https://console.developers.google.com/apis/api/maps_backend/overview
3. Enable the Openlayers UI module
4. Enter the key into the Google Maps Hybrid source in Openlayers: admin/structure/openlayers/sources/list/farm_map_source_google_hybrid/edit/options
Comments
Comment #2
Charles Gantt CreditAttribution: Charles Gantt as a volunteer commentedThis worked perfect for me! Huge thanks to the #farmOS IRC chat for helping me figure all of this out!
Comment #3
m.stentaHere is the Google blog post: http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-up...
It went into effect June 22nd. Anyone who had a farmOS site installed before that, and was actively using it, was automatically grandfathered in and does not need an API key:
Comment #4
m.stentaCross post: https://github.com/farmOS/documentation/issues/11
Comment #5
m.stentaRelated issue on Github: https://github.com/farmOS/farmOS/issues/7
Comment #6
m.stentaI created a related issue to explore the possibility of making Google Maps optional, and include other choices during install: #2772955: Add configuration for default map base layer
Comment #7
R.nissen CreditAttribution: R.nissen commentedHi.
I am trying to get FarmOs up n running, but i cant seem to figure out how to display the google maps - getting a missing key map error from the console (I see the map for a spilt second though).
I tried with the solution you posted on GIT but I keep getting the same error regardless. Basically I did: Install, then configuration and pasting in API key from google and set it to 200 ms and tried both http and https ? Do You have any pointers to how I can get it to work, was really looking forward to checking it it :D (btw im using the beta 12)?
Thanks
Comment #8
R.nissen CreditAttribution: R.nissen commentedComment #9
m.stentaI've added a blurb to the requirements on http://farmos.org/hosting/installing, with a link to full instructions at http://farmos.org/hosting/googlemaps
Comment #10
m.stentaAll farmOS repositories have been merged into the farmOS distribution (see #2876992: Merge farmOS repositories into drupal.org/project/farm). I'm going through and moving all open issues from the various project issue queues to the central queue now...
Comment #11
kaizerking CreditAttribution: kaizerking commented@m.stenta i dont see field named "key" in options
theres a title and description fields please
Comment #12
m.stenta@kaizerking - You must not be looking at the right config page. What is the path you are looking at? It should be
/admin/structure/openlayers/sources/list/farm_map_source_google_hybrid/edit/options
(and be sure that the "Openlayers UI" module is turned on, because that's what provides that config page).Official instructions are here: http://farmos.org/hosting/googlemaps/
If you are still unable to make it work, please post the detailed steps that you took and maybe a screenshot of the form you see after performing those steps. Start by following the instructions in the link above, of course.
Comment #13
kaizerking CreditAttribution: kaizerking commented@m.stenta I got it.I was looking for menu link for "list" . then i just copy pasted the the link/admin/structure/openlayers/sources/list/farm_map_source_google_hybrid/edit/options
it worked
Thank
.
Comment #14
m.stenta@kaizerking - Great! Glad to hear you figured it out!
Ultimately I think it would be helpful to add an easier interface for configuring the API key, as a shortcut into the inner workings of the Openlayers Source. This shouldn't be too hard. I created a new feature request and added it to the beta14 roadmap: #2884947: Add a shortcut configuration form for Google Maps API key