Hello! Does anyone know if its possible and how to use an external API such as Google Maps Javascript API V3? greetings Daniel
Hey Freakalot, I've been trying to figure out the same for a few days now with no luck of course. Does anyone know any way that we could use Google Maps Javascript API V 3 with Unity????
The answer is yes, you can, but the difficulty (and cost) vary on what you want to do. You can get (free) static maps from a simple WWW request using the Static Maps API: https://developers.google.com/maps/documentation/staticmaps/ There are Javascript and Flash versions of the dynamic API (what you're used to seeing at maps.google.com), but this is now a pay-for-usage API, and wouldn't be trivial (i.e. it would hard) to implement into Unity, as you will most likely have to go through a proxy, that is set up a go-between web page/web application through which your Unity app accesses the service. If all you need is maps then I'd suggest looking at OpenStreetMap. It's not only free, but it also lets you cache map tiles locally. There's an old (2009) entry in the wiki on OPM...it may be out of date, but it's a starting point. http://www.unifycommunity.com/wiki/index.php?title=OpenStreetMap_for_unity_iPhone Edit: There's a code snippet for grabbing and applying a Static Map to a texture in Unty Answers; see the second response down (by Tokenshi): http://answers.unity3d.com/questions/19263/embed-google-maps-into-unity-3d.html (p.s. you can find all of this out pretty easily using Google!)
Phil, thanks, I actually did find all that out more but as obviously as you can see, none of those show how I can use the Google Javascript API V3 on Unity. I did try countless times but obviously I had no idea what I was doing so it wasn't working anyways. And yes right now I'm using the Google Static map it works fine but I'd like it to have better functionality I'm quite sure that this could be achieved by using the full map with the API if I just knew a way how
Depends on what you want to do. Is it an Webplayer application? You can use Application.ExternalEval and ExternalCall to communicate with the DOM tree/Website outside of the player. Of course you have to embedd your Google Maps API JS scripts into the website where your webplayer is placed. But you can not implement the Map itself into unity (static image being the only exception, which can be downloaded with the required HTTP GET call, for that you don't need the JS anyways, just use the WWW class for it)
Tseng, it will be an Android/iPhone App actually. But yeah I did actually try embedding it to my site accessing it from there to create a static image but then again that's no use since it's just like using the Static Map that I already have in place right? Unless it can do more then that'll be brilliant but I honestly don't know because it didn't really work properly so I didn't really bother after a while.
i'm interested too, in how to use the google maps api, i tried static maps, but i need a map more dinamyc.
I'm looking into using the Overlay option from the google API https://developers.google.com/maps/documentation/javascript/examples/overlay-simple. in Unity. So I also would like to know if there is a way to use it. Thanks
I'm trying to change the url of MAPQuest to Google Map how can i ?? In MAPNAV.js script what is the url when i trying to implement Google Maps ????????????????????????