Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add ne and sw to bounds object#287

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

sleekybadger
Copy link
Contributor

Hi, thanks for the great library it serving to me faithfully not first time.

I found small problem with bounds object, most geo tools expect to receive data with NE and SW, instead of NW and SE. So i thought it will be cool if bounds object will contain all corners.

@istarkov
Copy link
Collaborator

Hi thank you, fully agree. Will check PR later today or tomorrow.

@istarkov
Copy link
Collaborator

All is fine, may be add ability to use NE SW (if NW SE is not provided) to documentedfitBounds ?

@sleekybadger
Copy link
ContributorAuthor

@istarkov It's make sense, what do you think about such approach:

  1. If we have NW and SE we're just using them.
  2. If we have NE and SW we're converting them into NW and SE and using same algorithm that we have infitBounds method.

@istarkov
Copy link
Collaborator

Super!

@sleekybadger
Copy link
ContributorAuthor

@istarkov cool, i'll push changes tomorrow morning

@istarkov
Copy link
Collaborator

Thank you!

@sleekybadger
Copy link
ContributorAuthor

@istarkov hm, I thought a little bit about it today, and i don't really like that we're passing NE and SW tofitBounds, but it returns NW and SE. What do you think about it?

Also i think will can add some helpers likeconvertNeSwToNwSe andconvertNwSeToNeSw, cause we're repeating this logic in few places.

@istarkov
Copy link
Collaborator

Agree that newBounds must have all corners,
any your decision onconvertXXX2YYY will be good.

@sleekybadger
Copy link
ContributorAuthor

@istarkov done!

};
}

const exports = {
Copy link
Collaborator

@istarkovistarkovNov 30, 2016
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

May be we will removeconst exports = and all thatthis below, as it was time whenexport default { blabla } was the same asexport const blabla
Having that it was deprecated in babel there is no need in exports object at all.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh, that part seemed strange to me) Sure.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Done!

@istarkov
Copy link
Collaborator

Super,
from first days I had knowledge that bounds object is not similar to others API
(and my laziness didn't allow me to fix that)

all that my

  const ne = { lat: nw.lat, lng: se.lng };  const sw = { lat: se.lat, lng: nw.lng };  return new LatLngBounds(sw, ne);

now will gone ;-)

Thank you a lot!!!!

@istarkovistarkov merged commit7a9a8d3 intogoogle-map-react:masterNov 30, 2016
@istarkov
Copy link
Collaborator

At npm google-map-react@0.22.0

@sleekybadger
Copy link
ContributorAuthor

Cool, glad that i helped 😉

istarkov reacted with thumbs up emoji

@sleekybadgersleekybadger deleted the feature/add-ne-sw-to-bounds branchNovember 30, 2016 20:20
@lock
Copy link

lockbot commentedDec 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@locklockbot locked asresolvedand limited conversation to collaboratorsDec 1, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@istarkovistarkovistarkov left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@sleekybadger@istarkov

[8]ページ先頭

©2009-2025 Movatter.jp