May I ask -
What would be a correct HTTP referrer in the GoogleMap API Credentials section, for showing map content in projects uploaded to the PackageViewer (iOS) ?
A HTTP referrer of localhost:1234/* (or similar) works in Safari but not in iOS.
Thanks & best regards,
Rainer
PackageViewer (iOS) & GoogleMap HTTP referrer ?
- Hopki
- Gnome
- Posts: 13029
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi Rainer,
Only do this if the tour is going to be loaded in the APP and no one can download the package.
So basically only you using it on your device, otherwise use OpenStreetMap as it's free.
If you leave the HTTP blank and it will then be open.
Regards,
Only do this if the tour is going to be loaded in the APP and no one can download the package.
So basically only you using it on your device, otherwise use OpenStreetMap as it's free.
If you leave the HTTP blank and it will then be open.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
The files in the package viewer are opened with the "file:" protocol. In the Google API key restrictions you need to use the macro __file_url__ to make the work. So with
you can allow Google Maps in the package, and also prevent others from using your key on their website.
Code: Select all
__file_url__/*
MfG, Thomas
Hello Thomas,
Hello Hopki,
my apologies but I haven't managed to follow your kind advice.
The key question is how to set the __file_url__ macro correctly.
Below is what I've tried.
All file/path names given are symbolic.
1.
Project Example-Test.p2vr on macOS, connected to Google Map APIs
Saved on local drive.
API: Maps JavaScript with application restriction HTTP referrer *localhost:12345/abcdefg/*
### Works including GoogleMaps access
2.
Saved Example-Test.p2vr as package, Example-Test.ggpkg, on local drive
Uploaded to iCloud Drive
### Opens in Package Viewer, without GoogleMaps connection
3.
URL of Example-Test.p2vr as indicated on iCloud Drive (Web):
https://www.icloud.com/iclouddrive/uvwx ... ple%5FTest
4.
Google Cloud Platform, Project selected, Credentials, Restrictions for API "Maps JavaScript API"
Application restrictions (type) : HTTP referrers (websites)
Website restrictions (for Pano2VR, macOS): *localhost:12345/abcdefg/*
Website restrictions (for Package Viewer, ipadOS): *www.icloud.com/iclouddrive/uvwxyz987654#Example%5FTest*
Saved in Google Cloud Platform.
See screenshot below, please.
Re-started Package Viewer on ipadOS
### Opens in Package Viewer, but still without GoogleMaps connection
### Error Message "page didn't load GoogleMaps correctly. See the JavaScript console ..."
Question:
Which is the correct way of entering file and url correctly ?
With the data above in your example __file_url__* ?
Thank you so much for your help & best regards,
Rainer
Hello Hopki,
my apologies but I haven't managed to follow your kind advice.
The key question is how to set the __file_url__ macro correctly.
Below is what I've tried.
All file/path names given are symbolic.
1.
Project Example-Test.p2vr on macOS, connected to Google Map APIs
Saved on local drive.
API: Maps JavaScript with application restriction HTTP referrer *localhost:12345/abcdefg/*
### Works including GoogleMaps access
2.
Saved Example-Test.p2vr as package, Example-Test.ggpkg, on local drive
Uploaded to iCloud Drive
### Opens in Package Viewer, without GoogleMaps connection
3.
URL of Example-Test.p2vr as indicated on iCloud Drive (Web):
https://www.icloud.com/iclouddrive/uvwx ... ple%5FTest
4.
Google Cloud Platform, Project selected, Credentials, Restrictions for API "Maps JavaScript API"
Application restrictions (type) : HTTP referrers (websites)
Website restrictions (for Pano2VR, macOS): *localhost:12345/abcdefg/*
Website restrictions (for Package Viewer, ipadOS): *www.icloud.com/iclouddrive/uvwxyz987654#Example%5FTest*
Saved in Google Cloud Platform.
See screenshot below, please.
Re-started Package Viewer on ipadOS
### Opens in Package Viewer, but still without GoogleMaps connection
### Error Message "page didn't load GoogleMaps correctly. See the JavaScript console ..."
Question:
Which is the correct way of entering file and url correctly ?
With the data above in your example __file_url__* ?
Thank you so much for your help & best regards,
Rainer
- Attachments
-
- Test.jpg (76.21 KiB) Viewed 4434 times
Might I ask you to have another look at the issue ?
Correct __file_url__ macro setup
PackageViewer (iOS) & GoogleMap HTTP referrer
Thanks a lot for your help & best regards,
Rainer
Correct __file_url__ macro setup
PackageViewer (iOS) & GoogleMap HTTP referrer
Thanks a lot for your help & best regards,
Rainer
Peres wrote: ↑Mon May 17, 2021 7:04 pm Hello Thomas,
Hello Hopki,
my apologies but I haven't managed to follow your kind advice.
The key question is how to set the __file_url__ macro correctly.
Below is what I've tried.
All file/path names given are symbolic.
1.
Project Example-Test.p2vr on macOS, connected to Google Map APIs
Saved on local drive.
API: Maps JavaScript with application restriction HTTP referrer *localhost:12345/abcdefg/*
### Works including GoogleMaps access
2.
Saved Example-Test.p2vr as package, Example-Test.ggpkg, on local drive
Uploaded to iCloud Drive
### Opens in Package Viewer, without GoogleMaps connection
3.
URL of Example-Test.p2vr as indicated on iCloud Drive (Web):
https://www.icloud.com/iclouddrive/uvwx ... ple%5FTest
4.
Google Cloud Platform, Project selected, Credentials, Restrictions for API "Maps JavaScript API"
Application restrictions (type) : HTTP referrers (websites)
Website restrictions (for Pano2VR, macOS): *localhost:12345/abcdefg/*
Website restrictions (for Package Viewer, ipadOS): *www.icloud.com/iclouddrive/uvwxyz987654#Example%5FTest*
Saved in Google Cloud Platform.
See screenshot below, please.
Re-started Package Viewer on ipadOS
### Opens in Package Viewer, but still without GoogleMaps connection
### Error Message "page didn't load GoogleMaps correctly. See the JavaScript console ..."
Question:
Which is the correct way of entering file and url correctly ?
With the data above in your example __file_url__* ?
Thank you so much for your help & best regards,
Rainer
Sorry, I made a small mistake. The URL should be __file_url__/* (the original post had a missing "/"). I fixed the original post, to make it easier for people to find the solution. You literally put __file_url__/* into the URL field as shown in the screenshot, as the actual path on your device is unknown, for security reasons. Also, iOS/Android may change those paths with newer OS versions.
MfG, Thomas