question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DjangoGooglePointFieldWidget is not defined

See original GitHub issue

Guys, 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: image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
erdemcommented, Jun 16, 2017

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 your index.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.

1reaction
gabrielpiccolo4commented, Jun 16, 2017

It worked! Thanks @erdem!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found