Jump to content

Game on Google Map


KayLotura
 Share

Recommended Posts

First time posting, looking for advice.
For my school's final project I'm building an html game inspired by Ingress and the like, but I am having a hard time getting the Google Map and the Phaser Game to play nicely together.
At this point, I'm just trying to get the game to render over the google map.

My current strategy is to get both to render to the same parent <div>, but because the map renders on document.ready(), it covers up the Phaser Game.
Is there a way to delay the Phaser Game from initiating, such as a function that would call it?

I'm also open to new strategies.

 

Thanks!

Link to comment
Share on other sites

Easier demonstrated than explained:

https://jsfiddle.net/lewster32/3h2e2v3c/

This technique should work regardless of how the map is embedded (so long as it's inserted into the #map div) as it relies on z-index rather than load order.

Bear in mind that I believe Google's terms of use require that you allow at very least the Google logo to remain clickable so that visitors can open the Google Maps site. You may need to work around this somehow to avoid problems.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...