Search Unity

Mapbox SDK. Implementing map into frame

Discussion in 'General Discussion' started by Sargemck, Mar 18, 2019.

  1. Sargemck

    Sargemck

    Joined:
    Nov 23, 2017
    Posts:
    2
    Hi, apologies in advance, I'm kind of a beginner.

    I'd like to implement from the Mapbox SDK a map similar to the one in the "zoomable map" example, where I have a top-down view of the map and can search using city and country name.

    I'd like to place this within a frame inside a canvas (one user interface screen) in my game.

    I've tried copying the 'map' object from that example as a prefab and pasting it into a frame in my canvas, but that seemed to have issues with camera. My understanding was that my main camera is already covering my whole canvas, though.

    Would anyone be available to help me out?

    Thanks a lot!
     
  2. SkylinR

    SkylinR

    Joined:
    Sep 4, 2015
    Posts:
    6
    I know it's quite old but maybe someone will need it
    To render map in frame (some element inside canvas) you can use Render Texture and set it to Raw Image (your frame) as well as to Camera which renders map. You can create Render Texture in editor or in script (runtime) if you need to check size of your Raw Image size before creating the texture.