Z
Z
z0rgoyok2015-04-18 08:49:14
Android
z0rgoyok, 2015-04-18 08:49:14

Android. How to attach Yandex maps to google maps via UrlTileProvider?

I do so, but the offset is obtained. Previously this issue was raised on the toaster , but without a solution

TileProvider provider = new UrlTileProvider(256,256) {
            @Override
            public URL getTileUrl(int x, int y, int zoom) {
                String url = String.format("http://vec04.maps.yandex.net/tiles?l=map&v=2.28.0&x=%d&y=%d&z=%d&lang=ru-RUg",
                        x,y,zoom);
                try {
                    return new URL(url);
                } catch (MalformedURLException e) {
                    throw new AssertionError(e);
                }
            }
        };

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
forgotten, 2015-04-20
@forgotten

The use of tiles outside of the Yandex API is prohibited.
https://legal.yandex.ru/maps_api/ section 2.3.3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question