-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
@willmorgan any thoughts on this? |
|
||
function centreOnMarker() { | ||
var center = marker.getPosition(); | ||
map.panTo(center); | ||
updateField(center); | ||
updateBounds(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
So yah, Everything else is fine. Thanks! |
@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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Any other tweaks need to make, just let me know. Cheers. |
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 |
Done squashing. |
Fantastic work! Apologies for delay, I was 🎿 -ing. |
super sick! |
Released an RC with this (https://github.com/BetterBrief/silverstripe-googlemapfield/releases/tag/v1.4.0-rc.1) |
Thanks! |
thanks for all your work on this @jallen0927 :) |
No worries. Also thank you guys for managing this repo @dhensby @willmorgan , this is really a handy and useful module for SilverStripe. |
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.