Topic: Display the map in Tileset mode in a specific area of the screen

Hi,

I'm using the map specifically in Tileset mode because it's fast and efficient, and it works great. However, I'd like to display the map in a specific area of the screen, near a corner, with a fixed size.

Right now, I can only get it to show centered on the screen or full-screen using the "Adjust To Screen" plugin. How can I position it in a specific area with a defined size while keeping it in Tileset mode?

Thanks in advance for any help!

Re: Display the map in Tileset mode in a specific area of the screen

I finally solved it by using a RawImage and a RenderTexture, as described in the manual (pdf). The only issue was that the OnlineMapsRawImageTouchForwarder component wasn’t working correctly: it only detected the mouse in the top right corner and didn’t zoom to where the cursor was pointing.

After some investigation and testing, I found that the problem only occurred when the RawImage pivot was not set to (0.5, 0.5). Upon reviewing the code, I identified the issue in line 224 of the OnlineMapsRawImageTouchForwarder, in the ProcessTouch method. I replaced localPosition += sizeDelta / 2.0f; with localPosition += sizeDelta * image.rectTransform.pivot;, and now it works correctly regardless of the pivot.

Could you please review if this solution is valid and consider incorporating the fix in the next release?

Thank you very much.

Re: Display the map in Tileset mode in a specific area of the screen

Hi.

Please have a look at Tileset on UI example scene.
It is exactly what you are looking for.
You can compare the settings in this scene and your scene to find out what you have a problem with.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Display the map in Tileset mode in a specific area of the screen

Thank you for your response.

I see that it works with the pivot is (0.5, 0.5), but it's not ideal, as it should work regardless of the pivot settings. Please, can you see my bug fix proposal above?

Thank you.