drag method
Drags the map by dx
, dy
pixels.
Implementation
void drag(double dx, double dy) {
var scale = pow(2.0, controller.zoom);
final norm = controller.projection.toTileIndex(controller.center);
final x = norm.x - (dx / tileSize) / scale;
final y = norm.y - (dy / tileSize) / scale;
final mon = TileIndex(x, y);
controller.center = controller.projection.toLatLng(mon);
}