Yandex Maps and preparing tiles
The guys here laid out a program for preparing the tile layer for the Yandex.Maps API.
In this regard, I will post my utility written this summer to cut a large card into pieces.
I post it along with the sources, the program is written in Java using JAI and ImageIO .
I wrote the utility specifically for Yota for this card .
The compiled jar nickname is in the / lib archive, there are also the necessary libraries for working under Windows (if you need to run under nixes, download either JAI and ImageIO and reprogram next to the jar nickname).
Launch: Accordingly,
[result image width] [result image height] - width / height of the resulting map (from which tiles are to be cut)
[rescaled map width] [rescaled map height] - how much the original image needs to be rescaled
[translation X] [translation Y] - offset of the red-hot maps in relation to the upper-left corner of the result
[tile X] [tile Y] - the sizes of the tiles into which the result will be cut (cut from the upper-left corner)
[result alpha] -% of the alpha channel adjustment (set the transparency of the tiles)
[result dir name] - where to put chopped tiles
[original map filename] - original image
Tiles are cut in PNG format, the name format is XY .png, where X, Y are the coordinates of the tile from the upper-left corner.
In this regard, I will post my utility written this summer to cut a large card into pieces.
I post it along with the sources, the program is written in Java using JAI and ImageIO .
I wrote the utility specifically for Yota for this card .
The compiled jar nickname is in the / lib archive, there are also the necessary libraries for working under Windows (if you need to run under nixes, download either JAI and ImageIO and reprogram next to the jar nickname).
Launch: Accordingly,
java -Xms1024m -Xmx1024m -cp ./;./jai_core.jar;./jai_codec.jar;./clibwrapper_jiio.jar;./mlibwrapper_jai.jar;./jai_imageio.jar;./map_cutter.jar ru.ak.tools.MapCutter
[result image width] [result image height]
[rescaled map width] [rescaled map height]
[translation X] [translation Y]
[tile X] [tile Y]
[result alpha]
[result dir name]
[original map filename]
[result image width] [result image height] - width / height of the resulting map (from which tiles are to be cut)
[rescaled map width] [rescaled map height] - how much the original image needs to be rescaled
[translation X] [translation Y] - offset of the red-hot maps in relation to the upper-left corner of the result
[tile X] [tile Y] - the sizes of the tiles into which the result will be cut (cut from the upper-left corner)
[result alpha] -% of the alpha channel adjustment (set the transparency of the tiles)
[result dir name] - where to put chopped tiles
[original map filename] - original image
Tiles are cut in PNG format, the name format is XY .png, where X, Y are the coordinates of the tile from the upper-left corner.