KayLotura Posted September 14, 2016 Share Posted September 14, 2016 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 More sharing options...
lewster32 Posted September 15, 2016 Share Posted September 15, 2016 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. drhayes, KayLotura and douglas 3 Link to comment Share on other sites More sharing options...
douglas Posted September 15, 2016 Share Posted September 15, 2016 By the way, well done @lewster32 it works https://jsfiddle.net/johndo101/y5j8kyby/ now i need to test PhaserIso in the same way Link to comment Share on other sites More sharing options...
KayLotura Posted September 15, 2016 Author Share Posted September 15, 2016 Ahhh! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts