Problem/Motivation
We already have google maps api key stored using the key module (https://www.drupal.org/project/key). When configuring geofield_map we would like to reuse it.
Steps to reproduce
install https://www.drupal.org/project/key
configure geofield field form to use Geofield Map widget
Configure "Gmap Api Key"
Proposed resolution
Allow user to set the key module key id as the "Gmap Api Key" (this is what geolocation_google_places_api does)
Remaining tasks
Fix patch and expand functionality
User interface changes
Gmap Api Key field description chanage
API changes
NA
Data model changes
NA
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | use_key_module_3281279-3.patch | 6.11 KB | gcb |
| geofield_maps.patch | 3.78 KB | rakugaki |
Issue fork geofield_map-3281279
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rakugaki commentedEnded up extending GeofieldMapWidget and changing the key there instead.
This was a bit simpler then patching.
Is there is any appetite to add this functionality to the module?
Comment #3
gcbThis feature is very desirable. I've updated the patch to be a little more robust and apply against the latest release.
Comment #4
gcbComment #5
rakugaki commentedComment #7
rakugaki commentedupdated MR to include @gcb's patch
Comment #9
itamair commentedComment #10
itamair commentedThanks ...
My latest commit added the following general improvements and integrations:
- Readme.md and Drupal.org documentation files
- GoogleMapsService: correct (optional) dependency injection of the key.repository Service
- GeofieldMapSettingsForm: better conditional GMap API Key settings component description, on the existence of the Key module
All this looks fine and solid to me.
Going to Merge and deploy a new Geofield Map 11.1.9 release with this Feature (Support to Key module for storing Google Maps Api Key)