Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Save bounds to database #30

Merged
merged 1 commit into from
Mar 20, 2016
Merged

Conversation

undefinedplayer
Copy link

My project has requirement that need to calculate the points those are in the region (defined by google map field). So bounds need to be saved to be more convenient calculating.

@dhensby
Copy link
Member

dhensby commented Mar 8, 2016

@willmorgan any thoughts on this?


function centreOnMarker() {
var center = marker.getPosition();
map.panTo(center);
updateField(center);
updateBounds();
Copy link
Member

Choose a reason for hiding this comment

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

Should be inside updateField, rather than being called in sequence.

Copy link
Author

Choose a reason for hiding this comment

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

Actually mapClicked doesn't need to update bounds. Deleted updateBounds() in mapClicked. So I think updateBounds should be separate from "updateLatLng". What do you think?

@willmorgan
Copy link
Member

So yah, updateBounds should sit inside updateField, and updateField should take a second argument, bounds.

Everything else is fine. Thanks!

@undefinedplayer undefinedplayer changed the title Save bounds to database [WIP]Save bounds to database Mar 8, 2016
@undefinedplayer undefinedplayer changed the title [WIP]Save bounds to database Save bounds to database Mar 8, 2016
@dhensby
Copy link
Member

dhensby commented Mar 8, 2016

@willmorgan if you're happy shall we ask for squishing and merge?

@@ -43,6 +44,9 @@

latField.val(latCoord);
lngField.val(lngCoord);
if(bounds) {
boundsField.val(bounds);
Copy link
Member

Choose a reason for hiding this comment

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

should call updateBounds here, instead of replicating the function body.

Copy link
Author

Choose a reason for hiding this comment

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

So no second parameter 'bounds' for the function?

@willmorgan willmorgan added the WIP label Mar 9, 2016
@undefinedplayer
Copy link
Author

Any other tweaks need to make, just let me know. Cheers.

@dhensby
Copy link
Member

dhensby commented Mar 14, 2016

Right, I think we are there - would you mind squashing this into 1 or 2 commits for the work you've done, then we can merge it, pending any objections from @willmorgan

@undefinedplayer
Copy link
Author

Done squashing.

@willmorgan willmorgan removed the WIP label Mar 20, 2016
@willmorgan willmorgan merged commit d6c7df6 into BetterBrief:master Mar 20, 2016
@willmorgan
Copy link
Member

Fantastic work! Apologies for delay, I was 🎿 -ing.

@dhensby
Copy link
Member

dhensby commented Mar 20, 2016

super sick!

@dhensby
Copy link
Member

dhensby commented Mar 20, 2016

Released an RC with this (https://github.com/BetterBrief/silverstripe-googlemapfield/releases/tag/v1.4.0-rc.1)

@undefinedplayer
Copy link
Author

Thanks!

@dhensby
Copy link
Member

dhensby commented Mar 20, 2016

thanks for all your work on this @jallen0927 :)

@undefinedplayer
Copy link
Author

No worries. Also thank you guys for managing this repo @dhensby @willmorgan , this is really a handy and useful module for SilverStripe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants