A quote from the Yandex documentation: “The layer of active regions and the picture layer exist independently of each other, and the order of adding them to the map is unimportant. In some cases, the layer of active regions can be used without a picture (for example, if you want to make the image of a house on map). " Now, how to implement it? There is an array of buildings in the form of polygons (JSON). Converted geographic coordinates to pixel. Recreated the file: wrapped json into a callback function. Running - and nothing. Do I need to break the screen into tiles and create a set of tiles for each zoom? If so, how can you find out the number of objects that fall on each tile (many thousands of objects)?

    1 answer 1

    Do I need to break the screen into tiles and create a set of tiles for each zoom?

    Yes need. See how this is implemented in the example.

    https://github.com/yandex/mapsapi-examples/tree/ru-v2.1/hotspot_layer/hotspot_data/10

    If so, how can you find out the number of objects that fall on each tile (many thousands of objects)?

    First you need to know what coordinates correspond to this tile. Here there is a function that solves the inverse problem https://tech.yandex.ru/maps/jsbox/2.1/dragger . And then select the objects falling into this file, even if they fall partially. Then generate the data for the file. This is the fastest technology, but file creation is an extremely time-consuming process.

    IMHO, you should take a closer look at ROM https://tech.yandex.ru/maps/doc/jsapi/2.1/dg/concepts/remote-object-manager/about-docpage/ it should pull out such volumes if you use clustering.

    • Does OM support clustering for polygons? - Cold Pol
    • ROM shows the data as you will return it, respectively, you can cluster the polygons too - se0ga
    • Cool. Thank. I'll try. - Cold Pol