GCRC / nunaliit

Nunaliit Atlas Framework
BSD 3-Clause "New" or "Revised" License
46 stars 15 forks source link

Google Maps API warnings in console #508

Open ahayes opened 8 years ago

ahayes commented 8 years ago

The following warnings appear in the chrome console when first interacting with a Google terrain map in Nunaliit. Is Google about to break stuff again?

Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys util.js:220 Google Maps API warning: RetiredVersion https://developers.google.com/maps/documentation/javascript/error-messages#retired-version util.js:220 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required

jpfiset commented 8 years ago

Need to replace the script element in index.html with:

<script src="http://maps.google.com/maps/api/js?v=3.23"></script>
ahayes commented 8 years ago

Are you going to move this into demo as the default or is there some code to change to get over this version hump and keep current with Google for now? I worry that setting this will break all the atlases at once in the future when Google deprecates it.

pulsifer commented 8 years ago

I too am seeing these message in the Javascript console and am feeling quite uneasy given past experiences with Google infrastructure. I will perform the fix indicated by JP, however please keep us up to date with required actions.

On Jun 16, 2016, at 11:42 AM, Amos Hayes notifications@github.com wrote:

Are you going to move this into demo as the default or is there some code to change to get over this version hump and keep current with Google for now? I worry that setting this will break all the atlases at once in the future when Google deprecates it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

roikle commented 7 years ago

This issue may need further consideration. See link below:

http://googlegeodevelopers.blogspot.ca/2016/06/building-for-scale-updates-to-google.html

ahayes commented 7 years ago

Looks like it broke today. Brand new 2.2.8-SNAPSHOT can't load Google maps.

js?v=3.3&sensor=false:32 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.bb @ js?v=3.3&sensor=false:32(anonymous function) @ common.js:52(anonymous function) @ common.js:224d @ common.js:46(anonymous function) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Finuitplaces.org%2Findex.html&callback=xdc.cbfl…:1 util.js:221 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keysuD.S @ util.js:221(anonymous function) @ js?v=3.3&sensor=false:127(anonymous function) @ js?v=3.3&sensor=false:47(anonymous function) @ js?v=3.3&sensor=false:44(anonymous function) @ js?v=3.3&sensor=false:47.M @ js?v=3.3&sensor=false:47(anonymous function) @ js?v=3.3&sensor=false:47_.Qb @ js?v=3.3&sensor=false:42oc @ js?v=3.3&sensor=false:47(anonymous function) @ js?v=3.3&sensor=false:127

ahayes commented 7 years ago

This explains it. Keys required for any new deployments. Existing implementations have been grandfathered. We're going to need a new prompt for nunaliit create and upgrade to ask if the user wants to use Google maps and if yes, to enter a Google API key (with a hint about where to get one).

https://googlegeodevelopers.blogspot.ca/2016/06/building-for-scale-updates-to-google.html

Alternatively, we could have the Demo atlas load with a different background. Maybe OSM. I will dig into it.

jpfiset commented 7 years ago

Amos, we probably need an OSM layer.

roikle commented 4 years ago

I believe this has been resolved with the inclusion of an Google API Key property which can be set using the nunaliit atlas configuration command nunaliit config. See wiki for further details.

Alternatively, if the atlas is not using a Google API Key, alternative WMS backgrounds can be used including Open Street Maps (OSM). See wiki documentation on module documents for further details.