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

m.stenta created an issue. See original summary.

Charles Gantt’s picture

This worked perfect for me! Huge thanks to the #farmOS IRC chat for helping me figure all of this out!

m.stenta’s picture

Here 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:

Existing applications have been grandfathered based on their current usage to ensure that they continue to function both now and in the future. We will also be proactively contacting all existing API key users who, based on usage growth patterns, may be impacted in the future. If you’re an existing user, please take the time to read our Policy Update for Standard Plan summary for details on how each of these changes might affect your implementation.

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

I 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

R.nissen’s picture

Hi.
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

R.nissen’s picture

m.stenta’s picture

Status: Active » Fixed

I'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

m.stenta’s picture

Project: Farm Map » farmOS

All 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...

kaizerking’s picture

@m.stenta i dont see field named "key" in options
theres a title and description fields please

m.stenta’s picture

@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.

kaizerking’s picture

@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
.

m.stenta’s picture

@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

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.