DjangoGooglePointFieldWidget is not defined
See original GitHub issueGuys, sorry to trouble you but I’ve followed the instructions in the docs and when my browser renders the page the debugger says 'ReferenceError: DjangoGooglePointFieldWidget is not defined'
in the following line: new DjangoGooglePointFieldWidget(mapWidgetOptions);
.
My template already has jQuery and Bootstrap setted, and inside Django settings the app 'mapwidgets',
is placed, I don’t know if this is an issue? The following image shows how the page is displayed:
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
python - django map widget console showing ... - Stack Overflow
But there is no map appearing and i have this in the browser console. Uncaught ReferenceError: DjangoGooglePointFieldWidget is not defined.
Read more >Uncaught ReferenceError: MapWidget is not defined
I use GeoDjango from Django 2.2 and OpenLayers 5. I've created a simple model with only two field: name and point. from django.contrib.gis.db ......
Read more >Google Map Point Field Widget
If there is no specific value set for the map center for mapCenterLocationName , mapCenterLocation the widget will be centred by the timezone...
Read more >django-map-widgets - PyPI
Map widgets work with Django Admin jQuery file. ### PointField Map Widgets #### Google Map Widget ##### Settings * **GOOGLE_MAP_API_KEY**: Put your Google...
Read more >django-map-widgets/widgets.py at master - GitHub
template_name = 'mapwidgets/google-point-field-widget.html'. settings = mw_settings. ... Use global `access_token` if it is not set in widget settings.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I understand the issue. Your template doesn’t have
{{ form.media }}
variable. Put{{ form.media }}
variable to<head>
tag or end of the<body>
tag in yourindex.html
. Then it should work.Like here: https://github.com/erdem/django-map-widgets/blob/master/example/templates/cities/form.html#L4
I missed this part when I was writing instructions. I will update the document soon.
Thank you for noticing me about that.
It worked! Thanks @erdem!