microsoft / MapsSDK-Unity

This repository contains samples, documentation, and supporting scripts for Maps SDK, a Microsoft Garage project.
MIT License
650 stars 128 forks source link

Is there any way to display specific area but mask around that area #198

Closed ferdi12-tr closed 1 year ago

ferdi12-tr commented 1 year ago

Hi there, I'm dwelled on some problem and need some help or useful perspective to solve this problem. Now I want to display only an area of map but the other areas must not be displayed and I want to mask that area somehow. So, the problem is display an GeoBoundingBox area and mask or just ignore another area, and when zoomed in or out, this masked area or ignored area must be masked or ignored accordingly.

let make this problem more clear, say I want to display Turkey's map but the neighbouring country of Turkey's also displayed and zoomed accordingly and I want to masked or ignored all neighbouring country of Turkey and displayed only Turkey map.

Maybe there isn't a direct solution but a fresh perspective can be useful.

Thanks!

This is the solution but when it comes to unity I don't know how to make my map like this

kircher1 commented 1 year ago

Yeah, the masking is not something supported by this SDK... But since one can customize the shader being used to render the map, a lot is possible with some work. A potential way to approach this would be to create and provide a custom texture layer that provides the mask data and then use the custom shader to grey-out pixels outside the area of interest.