Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Device Map - Native iOS Map

Discussion in 'Assets and Asset Store' started by Sycoforge, May 17, 2015.

  1. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751

    Get it on the Asset Store

    Creating iOS-Maps in Unity has never been that easy!

    The Device Map Asset for Unity provides a full map integration for iOS Devices. The asset uses the built-in Apple Map which providing access to all functionality from Apple Maps.

    Device Map allows you to create fully responsive (drag, zoom, pan, pinch, scroll...) Standard-, Satellite- and Hybrid-Maps, with the ability to change the map's appearance at runtime. Customize the look of the map the way you want: You don't like the blue dot indicating the device's current location? No problem! You can use your own image, or fully hide it from the map.

    Unlike most of the other Assets available, Device Map does not affect Unity's built-in device functionality, meaning you can access all device information just as you did before!

    device_map_twitter.png
     
    Gustavo-Quiroz likes this.
  2. Lashawn

    Lashawn

    Joined:
    May 8, 2017
    Posts:
    3
    i must say it is awesome and exactly what i was looking for, with that tho i have a few questions i was wondering if your can answer for me.
    1. How can i set locations on the map using unity UI's if its not possible what other alternatives are there?
    2. Is there a way that i can use this for and Android device or do you have another plug in specifically for android.
     
  3. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    Thank you for your nice words!

    There are several ways to change the location using the UI. You could, for example, register an event to the OnTouch event and set the map center accordingly.

    Code (CSharp):
    1.            
    2. DeviceMap.OnTouch += DeviceMap_OnTouch;
    3. ...
    4. static void DeviceMap_OnTouch(Vector2 touchCoordinate)
    5. {
    6.     SetMapCenter(touchCoordinate.x, touchCoordinate.y);
    7. }
    Or you could also trigger changes using user inputs such as address or long/lat values.
    Code (CSharp):
    1. DeviceMap.GoToLocationByAdress(...)
    2. DeviceMap.GoToLocationByCoordinate(...)
    We originally had planned to port DeviceMap to Android, but unfortunately, we had to postpone it because we needed every single coder on our game project and supporting media (only PC/Mac) :)
     
  4. Lashawn

    Lashawn

    Joined:
    May 8, 2017
    Posts:
    3
    Okay this is awesome also but i want to set the location myself something like how apple maps have locations built in like restaurants and gas stations, and not only as something the user can do. im not to familiar with working with maps
     
  5. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    So, you want to set an address on a button click event for example?
     
  6. Lashawn

    Lashawn

    Joined:
    May 8, 2017
    Posts:
    3
    Um no i want to enter buttons at different addresses or coordinates and have them already in the game for my users to be able to interact with, the same as having Starbucks and Uniqlo as illustrated in the image above. i want to be able to do that using UI buttons and be able to search for them using a UI Input Fields
     
    Last edited: Dec 30, 2017
  7. flyingaudio

    flyingaudio

    Joined:
    Dec 3, 2010
    Posts:
    97
    Hello,
    Does Device Map run on Unity 2018.3?
     
  8. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    Hi, Actually yes. But it has not been officially verified. I'll drop a voucher code for an evaluation version in PM.
     
  9. flyingaudio

    flyingaudio

    Joined:
    Dec 3, 2010
    Posts:
    97
    That's great, thank you @BitAssembler. What are your plans going into 2019.x. Specifically, if it stops working with 2019.x, will you be making adjustments to your asset so it will work with it?
     
  10. jiescobe

    jiescobe

    Joined:
    Feb 7, 2014
    Posts:
    3
    Hi @BitAssembler, I just got your plugin. Would you be able to provide a tutorial/code for how to create multiple types of annotations besides the one in the demo scene? I want to add a menu of different icons/annotation options, but not sure how to fit that in with the MapController script. Thanks
     
  11. BitAssembler

    BitAssembler

    Joined:
    Jul 13, 2017
    Posts:
    90
    You can create you own annotation graphics based on the included PSD template. Just adapt the pivot offset accordingly when paling it via code. So it's basically switching and replacing textures within Unity.
     
  12. Livindaki

    Livindaki

    Joined:
    Jun 13, 2017
    Posts:
    49
    i have Unity 5.6,4p2 .
    so when i run the demo it give me an error:
    EntryPointNotFoundException: _initMap
    ch.sycoforge.DeviceMap.DeviceMap.InitMap ()
    ???
     
  13. Sycoforge

    Sycoforge

    Joined:
    Oct 6, 2013
    Posts:
    751
    This is the expected behavior since the libraries will only be loaded when built for an iOS device. Apple Maps do only work on the device. Hope that helps.
     
  14. omidhedayati

    omidhedayati

    Joined:
    Nov 19, 2018
    Posts:
    4
    Hello there,why i'm getting this error when i try build to device with xcode?

    Classes/PluginBase/UnityViewControllerListener.h:44:8 Expected identifier or '('

    Thank you.