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

Uncaught InvalidValueError: not an Object #55

Open
RamezIssac opened this issue Oct 27, 2015 · 3 comments
Open

Uncaught InvalidValueError: not an Object #55

RamezIssac opened this issue Oct 27, 2015 · 3 comments

Comments

@RamezIssac
Copy link

When initializing the widget in admin form, latitude and longitude are set to null, which upsets google map api and raise Uncaught InvalidValueError: not an Object

Code exit point is here
https://github.com/philippbosch/django-geoposition/blob/master/geoposition/static/geoposition/geoposition.js#L125

@vishnuc17
Copy link

Got the same issue for me,found any fix for this

@thooor
Copy link

thooor commented Oct 28, 2015

I have the same issue, and I found that the problem is when the latitude and longitude variables are null.

So one posibility to fix it until you have a better solution is to initializate this variables with a default value in the lines 39 and 40 of the script, like this:

latitude = parseFloat($latitudeField.val()) || parseFloat(40.4379543),

This is not the better solution but at least it works!

PD: Sorry for my english

@manosim
Copy link

manosim commented Oct 28, 2015

I think @RamezIssac's PR #56 fixes the issue the right way.. Would be great to see that merged and a new release on pypi.

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

No branches or pull requests

4 participants