Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

google maps

Discussion in 'Android' started by gamer2300, Jan 16, 2013.

  1. gamer2300

    gamer2300

    Joined:
    Jan 16, 2013
    Posts:
    31
    How i can use static maps of google maps inside unity3d?
    I can't believe that unity team don't read all post about this argument.
    I want know why google maps can't be inside unity apps...
    So i think if i want use maps inside an apps i must use browser with connection active?
     
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Code (csharp):
    1. import System.IO;
    2.  
    3. private var url = "";
    4. var lat : float;
    5. var lon : float;
    6. var myzoom:int;
    7.  
    8. function google(){
    9.  
    10. url="http://maps.google.com/maps/api/staticmapcenter="+lat+","+lon+"&zoom="+myzoom.ToString()+"+&size=512x512&maptype=hybrid&sensor=false;
    11.        
    12. var www : WWW = new WWW(url);
    13. yield www;
    14.        
    15. renderer.material.mainTexture=www.texture;
    16. }
     
    Last edited: Jan 16, 2013
    gamer2300 likes this.
  3. Martin Aitken

    Martin Aitken

    Joined:
    Nov 27, 2013
    Posts:
    5
    gamer2300 likes this.