Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offset the center of the map #777

Closed
ixsans opened this issue Nov 19, 2020 · 4 comments
Closed

Offset the center of the map #777

ixsans opened this issue Nov 19, 2020 · 4 comments
Labels
duplicate This issue already exists feature This issue requests a new feature

Comments

@ixsans
Copy link

ixsans commented Nov 19, 2020

It is possible to offset the center of a location bounds with certain amount of pixel in flutter_map?
For example i multiple points and did calculation to get center of all points. Then i wanted to move map to some pixels and get it position in lat lng.

After get the lat lng, i want to move map position to it? is it possible?

Any answer will be appreciated.
Thanks

@kanhaic
Copy link

kanhaic commented Feb 7, 2021

I don't think there is a method in flutter_map to do that, I have achieved this by using the move method and subtracting 0.001 from latitude to move it up

options: MapOptions(
interactive: true,
maxZoom: 19,
center: LatLng(
(_currentLocation?.latitude ?? 0) - 0.001,
_currentLocation?.longitude ?? 0,
),
zoom: 17,
),

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 21, 2021
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

JaffaKetchup added a commit that referenced this issue May 29, 2023
…esolves #1460, #777, #952)

Major refactoring and re-organization to improve understandibility
@JaffaKetchup JaffaKetchup reopened this May 29, 2023
@JaffaKetchup JaffaKetchup linked a pull request May 29, 2023 that will close this issue
@JaffaKetchup
Copy link
Member

JaffaKetchup commented May 29, 2023

Replaced by #952. This will be added for v5 by #1532 (2764747)!

@JaffaKetchup JaffaKetchup closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2023
@JaffaKetchup JaffaKetchup added duplicate This issue already exists feature This issue requests a new feature labels May 29, 2023
JaffaKetchup added a commit that referenced this issue Jun 4, 2023
* Multiple changes, see PR body

* Updated CHANGELOG

* Added `offset` option to `FlutterMapState.move` and related methods (resolves #1460, #777, #952)
Major refactoring and re-organization to improve understandibility

* Updated CHANGELOG

* Ensure `id` of `MapController.move` is passed through to the emitted `MapEventMove`

Originally from #1534 (3eca34e) - thanks @rorystephenson!

Co-Authored-By: Rory Stephenson <3683599+rorystephenson@users.noreply.github.com>

* Fixed regression in commit 2764747 where internal `MapController` state was not continuous

* Added `rotateAroundPoint` - resolves #1460

Co-Authored-By: 6y <tlserver@yahoo.com>

* Updated CHANGELOG

* Added `TileLayer.fallbackUrl` support to `FileTileProvider`
Improved performance of `AssetTileProvider` when `TileLayer.fallbackUrl` not specified (resolves #1436)
Improved documentation about performance pitfalls of `TileLayer.fallbackUrl`

* Updated CHANGELOG

* Updated pubspec.yaml
Updated CHANGELOG

* Removed `saveLayers` property from `PolylineLayer`

* Updated CHANGELOG

* Updated MacOS configuration
Removed unnecessary Java installation from Windows GitHub Actions builder

* Added more position options to `AnchorAlign`
Deprecated `AnchorAlign.none` in favour of `AnchorAlign.center` or `null`
Improved response/emission time of `onTap`/`MapEventTap` when `InteractiveFlag.doubleTapZoom` is disabled
Improved `MarkerLayer`/`Layer` interoperability
Improved/reorganized example application
Updated CHANGELOG

* Simplified `Anchor`
Improved documentation of marker anchor methods
Improved CHANGELOG

* Updated version numbers

* Fixed bug in example application

* Added automated publishing action for tags in format 'v_._._'

* Updated CHANGELOG

* Added credit to CHANGELOG

---------

Co-authored-by: Rory Stephenson <3683599+rorystephenson@users.noreply.github.com>
Co-authored-by: 6y <tlserver@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue already exists feature This issue requests a new feature
Projects
None yet
Development

No branches or pull requests

3 participants