-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Google Map loading in Widgets #159
Comments
Hi, thanks a lot for the report! It seems that the Google Maps API is require an API key now for every usage. Is this right? If so, then we need to add some settings to provide the key. I don't know much about the Google Maps API so it would good to know what the "v=3" is doing and why we need it. |
@gagnesteph did you get it working with the change you describe? Because I wasn't able to :( |
Yes I got it to work by adding the v=3! import floppyforms.future as forms class GMapPolygonWidget(forms.gis.BaseGMapWidget, forms.gis.PolygonWidget):
For what I understand of it v = the version, since we use googleV3 I tried |
@gagnesteph and @gregmuellegger I did like this: class GMapPointWidget(forms.gis.BaseGMapWidget, forms.gis.PointWidget):
The layer (with zoom out and zoom in buttons and marker) appears but the map doesn't when page finishes loading. However, it shows up when I zoom map in. I don't know how to fix it. Any idea? |
@gagnesteph could you help me? |
I haven't done anything more than what I sent you! I would like to help you more but it is working for me juste like this: class GMapPolygonWidget(forms.gis.BaseGMapWidget, forms.gis.PolygonWidget):
My site is served over SSL so I had to download the librairies because the I'm sorry, i'm not very familiar with google api neither. |
I've added As a workaround I changed the default LonLat to be 0.1 and 0.1 instead of 0 and 0. I don't know why this changes anything, but that makes the map load for me work again. @gagnesteph @renanalencar does the current master solve anything for you? I think the proper fix would be to upgrade |
Where do you change the default LatLon? 2015-08-31 10:54 GMT-04:00 Gregor Müllegger [email protected]:
STÉPHANE GAGNÉ [image: Reptiletech] 6400 Auteuil, bureau 210, Brossard (Québec) J4Z 3P5 Avis de confidentialité : |
I did so in the MapWidget.js file: 131d4f7 |
Thanks 2015-09-01 9:47 GMT-04:00 Gregor Müllegger [email protected]:
STÉPHANE GAGNÉ [image: Reptiletech] 6400 Auteuil, bureau 210, Brossard (Québec) J4Z 3P5 Avis de confidentialité : |
For thos who have problems again with the map not showing, I fixed mine using this solution: Still using the 3.20 version of google api Good luck |
Sweet! I tested locally and seems to work. I applied this patch now as well. The changes are in master, could you please test as well to see if we are on the right track. After that I can prepare a new release so that anyone can benefit from this. Thanks for your ongoing efforts! |
You should replace : https://maps.google.com/maps/api/js?sensor=false
with
https://maps.google.com/maps/api/js?v=3&sensor=false
when loading google map api otherwise the map will not load anymore
The text was updated successfully, but these errors were encountered: