i want to get pixel x and y of map with touched but dont work in version 4.2.0 and higher. and it work in version 4.1.3 and older .
in version 4.1.3 this code is work :
@Override
public boolean onRasterTileClicked(RasterTileClickInfo clickInfo) {
MapTile mapTile = clickInfo.getMapTile();
Projection proj = rasterLayer.getDataSource().getProjection();
double projTileWidth = proj.getBounds().getDelta().getX() / (1 << mapTile.getZoom());
double projTileHeight = proj.getBounds().getDelta().getY() / (1 << mapTile.getZoom());
double projTileX0 = proj.getBounds().getMin().getX() + mapTile.getX() * projTileWidth;
double projTileY0 = proj.getBounds().getMin().getY() + ((1 << mapTile.getZoom()) - 1 - mapTile.getY()) * projTileHeight;
double normTileX = (clickInfo.getClickPos().getX() - projTileX0) / projTileWidth;
double normTileY = (clickInfo.getClickPos().getY() - projTileY0) / projTileHeight;
Log.d("", "Clicked at: " + (int) (normTileX * 256) + ", " + (int) (normTileY * 256));
return true;
}
}); ```