(index):49 Uncaught SyntaxError: Unexpected identifier
When run the examples i get the following error: (index):49 Uncaught SyntaxError: Unexpected identifier, in the last line of following code:
gmap = new google.maps.Map(
document.getElementById('gmap'), {
center: new google.maps.LatLng(37.4419, -122.1419),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoomControl: true,
mapTypeControl: true,
scaleControl: true,
streetViewControl: true,
rotateControl: true,
scrollwheel: true,
fullscreenControl: true
styles: "height:500px;width:800px;margin:0;"
});
Looks like he needs the comma at the end of the next line of code. " fullscreenControl: true".
Thanks a lot. DTapia.
I can confirm this seems to be a bug with the package, how can we get this resolved ?
I fixed this bug in the package for my project and it works now! thanks @DTHerrera for this notification.
For @iclarke I use a virtual environment, so this is my route: venv>lib>[your python version]>site-packages>flask_googlemaps>templates>googlemaps>gmapjs.html and around line 46 -- fullscreenControl: blablabla , add a comma at the endf that line, save and test it.
This is my first comment, so please forgive me if I made some error or violated any reglementation
Sorry I forgot. I'm using python 3.9 , Flask= 1.1.2, flask_googlemaps=0.4.1, jinja2= 2.11.3
Thanks @mgutierrez80 ! I actually read somewhere that the bug had been fixed in a subsequent version and verified it was the case but forgot to update the thread - cheers!
hi, I still encounter this when installing flask-googlemaps 0.4.1. i have to manually update the gmapjs.html. may I know how to resolve this issue?
these are versions i'm using Jinja2 3.0.1 Flask 2.0.1 flask-googlemaps 0.4.1 Python 3.9.4
For anyone who came across this, looks like a new release should be coming soon: https://github.com/flask-extensions/Flask-GoogleMaps/issues/148
In the meantime, I was able to install from the archive
python3 -m pip install https://github.com/flask-extensions/Flask-GoogleMaps/archive/refs/tags/0.4.1.1.tar.gz