sorin.botirla Posted January 15, 2015 Share Posted January 15, 2015 Hello,I'm trying to build a mobile game which use GPS positioning and Google Maps.The main objective is to find targets located on the Google Maps coordinates and to interact with them. How could I add a Google Maps layer as a dynamic ground, based on GPS coordinates? I've seen a Bing Maps example but that's not very helpful. Quote Link to comment Share on other sites More sharing options...
joshcamas Posted January 15, 2015 Share Posted January 15, 2015 I would take a look at the Google Maps API:https://developers.google.com/maps/documentation/javascript Especially look at:https://developers.google.com/maps/documentation/elevation/ So basically take a look around that site; it should provide ways to do what you need. Good luck! sorin.botirla 1 Quote Link to comment Share on other sites More sharing options...
sorin.botirla Posted January 17, 2015 Author Share Posted January 17, 2015 thank you, joshcamas for the tips. But I don't actually want to use elevation in the game, I just want to know how to add the google maps layer to the Babylon.js ground.What I want to achieve it's mainly like a canvas/html embedded in the Babylon ground or plane. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 17, 2015 Share Posted January 17, 2015 Start with this: https://developers.google.com/maps/documentation/javascript/examples/ Google map is a specific API, it is not integrated in Babylon. To do what you want, you must create static map with Google map API and use as a texture on a plot with Babylon API. sorin.botirla 1 Quote Link to comment Share on other sites More sharing options...
sorin.botirla Posted January 19, 2015 Author Share Posted January 19, 2015 yes, that's the right way to do it, but as I know, the Babylon.js textures are just images, not other canvas/html/ elements. Or i might be wrong. Quote Link to comment Share on other sites More sharing options...
iiceman Posted January 19, 2015 Share Posted January 19, 2015 I think that's why dad72 suggested the static google maps API: https://developers.google.com/maps/documentation/staticmaps/?hl=en Using a canvas element as texture is possible, too, as far as I know. It is called dynamic texture, an example can be found here: http://blogs.msdn.com/b/eternalcoding/archive/2013/08/12/creating-a-3d-chart-for-your-windows-8-1-app-using-babylon-js.aspx I hope that helps sorin.botirla 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 19, 2015 Share Posted January 19, 2015 SB... you might want to look at https://github.com/BabylonJS/Babylon.js/wiki ... #15 in the More Advanced Features section (tiled grounds). One of Célian's demos uses openStreetMap.org tiles... to make maps on ground planes. I don't know how interactive they are, though. You may run into the same problem with dynamicTextures, too. Sure, you can likely place a map on a plane, but what will be clickable and how to make it so? *scratch scratch* sorin.botirla and RyanONeill1970 2 Quote Link to comment Share on other sites More sharing options...
sorin.botirla Posted January 23, 2015 Author Share Posted January 23, 2015 Wingnutyour solution lead to the expected result. Tiled ground was actually what I wanted. Thank you so much! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.