Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(index):49 Uncaught SyntaxError: Unexpected identifier #145

Open
DTHerrera opened this issue Mar 27, 2021 · 6 comments
Open

(index):49 Uncaught SyntaxError: Unexpected identifier #145

DTHerrera opened this issue Mar 27, 2021 · 6 comments
Labels

Comments

@DTHerrera
Copy link

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.

@DTHerrera DTHerrera added the bug label Mar 27, 2021
@Samy-Doreau
Copy link

I can confirm this seems to be a bug with the package, how can we get this resolved ?

@mgutierrez80
Copy link

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

@mgutierrez80
Copy link

Sorry I forgot. I'm using python 3.9 , Flask= 1.1.2, flask_googlemaps=0.4.1, jinja2= 2.11.3

@Samy-Doreau
Copy link

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!

@madonnaroseph
Copy link

madonnaroseph commented Aug 4, 2021

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

@kronomon
Copy link

kronomon commented Mar 3, 2022

For anyone who came across this, looks like a new release should be coming soon: #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants