Django django-location-field missing API Keys


I am using the https://github.com/caioariede/django-location-field library to build a Location View using Django. The issue is that I can't find a documentation saying how to define my own Google Maps API KEY.

This is the code I have on my settings.py:

LOCATION_FIELD_PATH = STATIC_URL + 'location_field'
LOCATION_FIELD = {
    'map.provider': 'google',
    'map.zoom': 13,

    'search.provider': 'google',
    'search.suffix': '',

    # Google
    'provider.google.api': '//maps.google.com/maps/api/js',
    'provider.google.api_key': 'MY_API_KEY_HERE',
    'provider.google.map_type': 'ROADMAP',


    # misc
    'resources.root_path': LOCATION_FIELD_PATH,
    'resources.media': {
        'js': [
           LOCATION_FIELD_PATH + '/js/jquery.livequery.js',
            LOCATION_FIELD_PATH + '/js/form.js',
        ],
    },
}

But this solution dose not seem to work.

maps.google.com/maps-api-v3/api/js/28/11/util.js:219 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

I have been searching for a while now, but no luck in getting the answer.

Error I get


Answers:


You may use django-geoposition instead of django-location-field. It has the same functionality and also has a simple documentation https://django-geoposition.readthedocs.io/en/latest/.

You can find how to define your Google Maps API KEY in https://django-geoposition.readthedocs.io/en/latest/#installation.