Search Unity

Maps In Unity 3D - Share your experience

Discussion in 'Assets and Asset Store' started by AlanGrant, Mar 7, 2018.

  1. shirleycreates

    shirleycreates

    Joined:
    May 18, 2021
    Posts:
    2

    Hey Alan!

    Love the plugin so far and really excited to understand it better. I'm not much of a coder and just got into development. Currently, I'm attempting to add objects to the map. I've gone through the tutorials but I'm still a little confused.

    I'm using Mapbox and I've set up the Google Places API, everything is working well on that end. However, in order to instantiate the objects does it have to be done in the code? Or is there somewhere in the inspector that I can att the lat, long? I tried finding the DropPin method but I don't see anything for coordinates in the inspector. Any help with this?

    Thanks
    Shirley
     
  2. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    74
    Hello, I have a couple requests for the BaseLocationManager:
    - add a onSpeedChanged event
    - add the function LoadDemoLocation to this class as empty virtual, so I can implement it my own subclass (I dont use LocationManager)
     
  3. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hello Shirley,

    Thanks for purchasing GoMap!
    The easiest way to add gameobjects to specific kind of places, without coding, is to use the native mapbox POIs and it's done just like that.

    upload_2022-1-28_17-3-12.png

    Expand the GoMap inspector, find the Pois section, add an element to the rendering options list and enter the kind of place and the prefab you want for each of the points of that kind. Remember, the "disabled" flag needs to be off.

    upload_2022-1-28_17-3-29.png


    And that's the result!



    Bye
     

    Attached Files:

  4. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Thanks I'll consider it in the next releases.
    Bye!
     
  5. godril

    godril

    Joined:
    Oct 21, 2013
    Posts:
    4
    Hey everyone. I bought the asset but the GPS is not starting somehow, anyone else had this happen to them?
     
  6. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    This could happen on iOS if you forgot to add the location permission string in the build settings.
     
  7. godril

    godril

    Joined:
    Oct 21, 2013
    Posts:
    4
    it's happening on Android, even if I manually allow the location permission. It then says that the signal is weak.
    I was using Unity 2020.28f1 but using 2020.3.4f1 it seems to work (still, I have to manually allow the permission).

    The issue with 2020.3.4f1 is that the rendering options menu when opened, overlays with the rest of the interface rending it unusable.

    Any recommendation on a unity version that will work with this asset?
    Thank you ;)
     
    Last edited: Feb 14, 2022
  8. Kholeslaw

    Kholeslaw

    Joined:
    May 7, 2013
    Posts:
    35
    @AlanGrant I am trying to import the Mapbox SDK into my project which already has Go Map installed and it is conflicting with the existing scripts used for decoding mapbox tiles. Do you have a version of Mapbox SDK which is tailored to work with Go Map, or some guidance as to how to get these two assets to work in the same project?

    I am using Go Map for it's great 3D world map but I also need to implement a lightweight slippy map elsewhere in the game. I tried doing it with Go Map but it is far too slow for this purpose. Using Mapbox SDK slippy map is very fast in comparison, I thought I would use each for their own strengths.

    I am also open to other suggestions on meeting my needs.
    thanks!
     
  9. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    I'm using Unity 2021.1.2f1
     
  10. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Even though I'm not always experiencing this bug, it seems a known unity bug and it is fixed in the latest unity version: https://issuetracker.unity3d.com/issues/scriptableobject-with-an-array-of-serializable-classes-with-arrays-in-them-is-overlapping-in-the-inspector-when-expanded

    I
    've tested using 2021.2.11f1 and it seems to be working fine.
     
  11. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    To use both GoMap and Mapbox sdk in the same project you can safely delete the folder GoMap - 3D Map For AR Gaming/GOShared/Decoders/Mapbox/vector-tile-cs-master
     
    Kholeslaw likes this.
  12. godril

    godril

    Joined:
    Oct 21, 2013
    Posts:
    4
    Indeed with v2021 the inspector issue disappeared, thank you.
     
  13. chrenzi

    chrenzi

    Joined:
    Aug 15, 2019
    Posts:
    2
    Hi,
    I'm trying to replace the hot air balloons prefab with something different, but I can't find where they are defined. Can anyone help?
    Thanks
     
  14. BlazinXun

    BlazinXun

    Joined:
    Nov 20, 2020
    Posts:
    1
    Hi, I am having issues with the GPS update due to the issues with Unity and Android 12. Is there any workaround for this? Thank you.
     
  15. Cyb3rNomad

    Cyb3rNomad

    Joined:
    Oct 18, 2020
    Posts:
    3
    Hi Alan, wonder if you may be able to help. I am trying to get the unique building id of the buildings from the MapBox API and add this to the GoFeature class so I can identify each building. MapBox already has these from their API "mapbox.mapbox-streets-v8"

    In the GOPbfProcedure class I'm pretty sure I'm getting the correct building id by adding.
    Code (CSharp):
    1. gf.id = vtf.Id;
    on line 157

    and also on added on line 280
    Code (CSharp):
    1.    gfm.id = gf.id;
    Is this the correct way to get building ids?
    Would it be possible in a future update to be able to combine the mesh's of Multi Polygon GOFeature's that share the same building id into one mesh ?

    I understand this could become complicated where there is a building that shares ids across multiple tiles like this one

     
    Last edited: Mar 13, 2022
  16. fschaar

    fschaar

    Joined:
    Jul 3, 2012
    Posts:
    14
    Is it possible to remove layers from the tiles during runtime or reload tile with less layers - like removing buildings?
    I tried to hit disable on a layer, but it throws errors
     
  17. fschaar

    fschaar

    Joined:
    Jul 3, 2012
    Posts:
    14
    Okay, I managed to do this with useOnly.the thing is, I want to zoom out and by doing this, i want to reduce complecity of the map, by removing buildings first, then major roads, then small roads etc. What is the best way to do that? Triggering a reload? How to do that? And then everything will be rebuild, which is not intended, I just want to remove the buildings for example.
    Any hints?
     
  18. RogueStarSlade

    RogueStarSlade

    Joined:
    Mar 6, 2021
    Posts:
    2
    Has anyone successfully integrated this with the Oculus Quest 1/2? Curious if anyone has attempted and has had some success.
     
  19. Danny9421

    Danny9421

    Joined:
    Mar 21, 2022
    Posts:
    36
    Is there one of the available services free to use ?
    Mapbox api might charge after 25k monthly users.
    Maptiler api might charge if request > 100k
    ESRI might charge after 2000000 tiles ?
    NextZen free ?

    Is there a way to use the plain OSM api ? (which seem to be free always)
     
    Last edited: Jun 1, 2022
    raincrowgames and AM-Dev like this.
  20. MikeCheck123

    MikeCheck123

    Joined:
    Jun 6, 2022
    Posts:
    6
    Hey @AlanGrant and everyone,

    Im having a problem with my character animation. The character starts the walk animation but stops every few steps going back and forward with the Idle animation. Any ideas on what is causing this?

    ezgif.com-gif-maker (3).gif
     
  21. sunlin15803469083

    sunlin15803469083

    Joined:
    May 6, 2022
    Posts:
    1
    hi,@AlanGrant, i watch your tutitor about use custom POI data,but, it too old to i cannot make it work following your step, can you spend some time update yout document? thank you
     
  22. AhmadAllahham

    AhmadAllahham

    Joined:
    Jun 23, 2022
    Posts:
    1
    For anyone experiencing this issue, I found a workaround mentioned here:
    https://issuetracker.unity3d.com/is...n-the-inspector-when-expanded?page=4#comments
    By adding "[NonReorderable]" behind the variable decleration of "renderingOptions" in "GoLayer.cs", it seems to stop the overlapping issue
     
  23. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    20
    Anybody have experience with the event handler for onOriginSet? I finally figured out why my conversion to Vector3 was sending my objects off the map. It seems so simple when I see their code, but yikes... I'm not getting the same results as the GO Maps examples. So... here's what I have...

    Inside an empty object, I have the DroneData class which contains all of this at the top...

    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.UI;
    6. using System.IO;
    7. using System.Linq;
    8. using System.Text.RegularExpressions;
    9. using System;
    10. using GoMap;
    11. using System.Collections.Generic;
    12. using UnityEngine.Networking;
    13. using LocationManagerEnums;
    14. using GoShared;
    15. using UnityEngine.Events;
    16.  
    17. using UnityEngine.SceneManagement;
    18.  
    19. public class DroneData : MonoBehaviour
    20. {
    21.  
    22.     //initialize variables
    23.     public GOMap goMap;
    Then, down below in the start I have this:

    Code (CSharp):
    1. // Start is called before the first frame update
    2.     void Start()
    3.     {
    4.         loadDroneList();
    5.         Debug.Log(goMap);
    6.         //SceneManager.sceneLoaded += OnSceneLoaded;
    7.         goMap.locationManager.onOriginSet.AddListener((Coordinates) => {OnOriginSet(Coordinates);});
    8.         //goMap.locationManager.onOriginSet.AddListener(SpawnDrones);
    9.         //goMap.locationManager.onLocationChanged.AddListener((Coordinates) => {OnLocationChanged(Coordinates);});
    10.        
    11.     }
    12.  
    13.   void OnOriginSet(Coordinates originCoords){
    14.         Debug.Log("gotHere");
    15.         //SpawnDrones();
    16.     }
    and it generates this in the console:

    upload_2022-8-4_16-37-6.png

    so apparently goMap is returning null, and it really shouldn't so far as I can tell. Any ideas what I'm doing wrong? Because my code looks almost exactly the same as the Avatar's code in the example I'm building this test on top of...

    HELP?!
     
  24. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hi,

    You're probably just missing the linking part.
    In your script inspector you'll see a GoMap empty box where you cn drag the GoMap game object that's in your scene. In this way the goMap variable in your component will not be null.

    I hope that helps,
    Alan
     
    TempestDroneworx and Danny9421 like this.
  25. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    20
    Yup o_O
     
  26. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    20
    ok, new question... trying to convert an AGL (above ground level) altitude to vector 3 in gomaps with a 3D terrain.

    1: is there an easy way built in?
    2: if not, how do I get the altitude at a set of GPS coordinates, and then what's the conversion ratio? (doesn't matter to me if it's meters, feet, etc... I can convert that myself)
     
  27. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    20
    Just pinging again... any way to set an above ground level vector 3 coordinate based on known AGL altitude and GPS coords?
     
  28. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    20
    Again, any help on getting AGL altitude marked would be really helpful. Do you have a hook for this?
     
  29. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    Hello,

    To convert any Vector3 to a Coordinates object you always have to use the "convertVectorToCoordinates" method. And remember to use it after GoMap has set the origin.

    Also, you shouldn't really "ping" me or anyone else on the forum, but you can send me an email and I will answer your questions in a matter of days.

    Bye
    Alan
     
  30. TempestDroneworx

    TempestDroneworx

    Joined:
    Jul 12, 2022
    Posts:
    20
    Happy to. I also DMed you. Please be so kind as to send me your email?
     
  31. appmechanic

    appmechanic

    Joined:
    Sep 10, 2016
    Posts:
    14
    Hello,

    I am using Go Map for my project, but I am facing some issue with Buildings spawning in the Road as well.

    Have a look at the Screenshot : https://drive.google.com/file/d/1HOB_HFA4_Vxjsr3gYGwbCt5omhZaPi2C/view?usp=sharing

    My Location Coordinate : 40.711872,-74.009636
    I am getting this issue on multiple coordinates.

    Can you tell me, why Buildings are spawning in the middle of Road?

    Please suggest me, how I can fix this.
     
  32. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    I answered at your email. That road is probably a tunnel and maybe you don’t want them rendered in your location based game.
     
  33. appmechanic

    appmechanic

    Joined:
    Sep 10, 2016
    Posts:
    14
    Hello Alan,

    I am not sure if I got the email from your end, I was waiting. Can you confirm again, My email ID is : info.appmechanic@gmail.com

    So I removed 2 types of Building Types from Terrain
    - Train Station
    - Buildings Part

    If I create the 3D Model of Tunnel and replace that Building with Train Station or some kind of Tunnel and set up necessary colliders, It will work, right?

    I still see some Building on the Road. That I found with Building name of "Building" itself. But if I remove that, most of th Buildings gets removed.

    Any idea, what exactly that refers too, what is the significance of Building name "Buildings"
     
  34. Faizalski

    Faizalski

    Joined:
    Oct 4, 2018
    Posts:
    27
    @AlanGrant
    Does your asset requires internet connection and gps to work? Also can I use it as an offline standalone app?
    Many thanks
     
    Last edited: Sep 16, 2022
  35. AlanGrant

    AlanGrant

    Joined:
    Aug 27, 2016
    Posts:
    97
    GoMap requires an active internet connection to download the map data. Also gps without internet connection has a very poor accuracy.

    Still GoMap has a caching feature that loads map data from a local storage if it was previously downloaded.
     
    shyamarama likes this.
  36. appmechanic

    appmechanic

    Joined:
    Sep 10, 2016
    Posts:
    14
    Hello Alan,

    I would like to change the Building 3D Models, like I want to Put my own 3D Models of Building as per its significance. Can you tell me, how can I do that. I want to add 3D Models of Hospital, Schools etc based on the Building Types.

    Looking forward hearing back from your end!

    Thanks & Regard
    Paramjot Singh
     
  37. choigw

    choigw

    Joined:
    Jul 21, 2020
    Posts:
    4
    there`s the shader problem on my project using URP.
    some materials not compatible with URP(Universe Rendering Pipeline) and try to find how to fix it.

    'Assets/GO Map - 3D Map For AR Gaming/Demo/Materials/GOTerrain materials/Low Poly Materials'
    materials in that path have the problem.
     
  38. OrionOmega

    OrionOmega

    Joined:
    Jun 30, 2022
    Posts:
    1
    Hi @AlanGrant, We bought your asset and we want make custom POIs, can you gives some tips.
    Thanks and keep the good work, your asset is pretty cool!
     
  39. Salio

    Salio

    Joined:
    Sep 27, 2012
    Posts:
    5
    Hi @AlanGrant, Any chance on fixing street names not rendering properly with OSM?
    Heres a screen shot of the Drop Features Demo using Mapbox in Rome:
    https://imgur.com/GpXMRIn


    And this one is using OSM:
    https://imgur.com/pKw4pCF


    Also it would be nice to have a host field(and optional field for an api key) where we can enter a url for those of us who host our own maps.
     
    Last edited: Dec 30, 2022
  40. Brian-Kryptomon

    Brian-Kryptomon

    Joined:
    Apr 17, 2022
    Posts:
    17
    There may be something obvious I am missing or perhaps it’s just not possible.

    Is it possible to allow players to zoom out to a city view? I can’t seem to get the map to be wider than 2km and we used to have a web version of our game and we could zoom out to the entire city so players could see everything in a wide area but this doesn’t seem possible in GoMap.
     
  41. RihardC

    RihardC

    Joined:
    Nov 27, 2022
    Posts:
    1
    If desiredAccuracy is less than 30, why is the map not loaded?
     
  42. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    114
    Is there an option to shift map origin?
     
  43. JuanGuzmanH

    JuanGuzmanH

    Joined:
    Feb 8, 2018
    Posts:
    74
    Hi Alan! First of all, congrats for the asset!

    I would like to have the boundaries, as a path or even better as a poligon, separated by postal codes (zip codes).

    I know some maps integrates then under "Administrative" at different levels. In my frist attemp I was not able to do get that.

    - Can you point in the right direction? Wich maps are better to get just this info?

    - How can I modifiy the queries to ask the map service what to integrate?

    Im considering also to host my own map that includes the boundaries I want

    How can I change the url of each service?
     
  44. kuabs

    kuabs

    Joined:
    Aug 29, 2023
    Posts:
    6
    Hi Alan!

    2 questions on this awesome asset:

    1. API Key Protection: If we're building a mobile app with GoMap, which are frequently subject to reverse engineering (since people can just download an apk and use tools to snoop around), how do we protect our various API keys that are stored in-editor (and therefor in-code I assume) from being exposed and used elsewhere on our wallet?

    IE is there a tutorial for making sure the API keys are only usable from our apps (iPhone/Android/Unity)?

    2. Regarding the caching above, is this automatically in place? My scenario would not be gps based, I would like a user to be able to enter an address and walk around using drag-to-move basically.

    Also how big (roughly) is a tile? Curious about cost management per user, as these APIs aren't free of course. Especially confused how it works/is sustainable given OSM's API Tile policy: https://operations.osmfoundation.org/policies/tiles/ . It seems they don't want people building PoGo style games on their API based on this
     
    Last edited: Dec 16, 2023
    raincrowgames likes this.
  45. tina2445

    tina2445

    Joined:
    Apr 7, 2021
    Posts:
    1
    Hello!

    I developed a game that like pokemonGo and upload Google Play Store and App Store.

    There is a question about GPS signal, I install apk on my phone and download game on App Store run well, but GPS signal have problem if I download game on Play Store.

    GPS signal problem example:
    I open a web in game and leave game, then I back to the game the banner show ''GPS signal not found".

    I have no idea that how to slove this problem.
     
  46. Markman1207

    Markman1207

    Joined:
    Mar 5, 2022
    Posts:
    2
    Hi, if anyone is familiar with the Go Map for AR Gaming package, I'm trying to find a way to make it so that only a subsection of the map is rendered and nothing else, does anyone have any ideas on how I'd go about this?