Update google-maps-clipper.json to grab correct coordinates - #22
Open
willthamic wants to merge 1 commit into
Open
Update google-maps-clipper.json to grab correct coordinates#22willthamic wants to merge 1 commit into
willthamic wants to merge 1 commit into
Conversation
A google maps url has the format: https://www.google.com/maps/place/Washington+Monument/@38.8894583,-77.0377464,1469m/data=!3m2!1e3!4b1!4m6!3m5!1s0x89b7b7a1be0c2e7f:0xe97346828ed0bfb8!8m2!3d38.8894838!4d-77.0352791!16zL20vMDE2ZGZm?entry=ttu&g_ep=EgoyMDI2MDEyOC4wIKXMDSoASAFQAw%3D%3D The first two coordinates (38.8894583,-77.0377464) are offset from the coordinates of the searched location found later in the url (38.8894838, -77.0352791). This change probably grabs the second set of coordinates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A google maps url has the format:
https://www.google.com/maps/place/Washington+Monument/@38.8894583,-77.0377464,1469m/data=!3m2!1e3!4b1!4m6!3m5!1s0x89b7b7a1be0c2e7f:0xe97346828ed0bfb8!8m2!3d38.8894838!4d-77.0352791!16zL20vMDE2ZGZm?entry=ttu&g_ep=EgoyMDI2MDEyOC4wIKXMDSoASAFQAw%3D%3D
The first two coordinates (38.8894583,-77.0377464) are offset from the coordinates of the searched location found later in the url (38.8894838, -77.0352791). This change probably grabs the second set of coordinates.
Alternate scheme by dkaue on discord, but this seems less clean:
{{url|replace:"/^.+?(?:data=.+?!3d(-?\d+\.\d+)!4d(-?\d+\.\d+).+)?$/":"$1,$2"}}