Skip to content

Update google-maps-clipper.json to grab correct coordinates - #22

Open
willthamic wants to merge 1 commit into
kepano:mainfrom
willthamic:patch-1
Open

Update google-maps-clipper.json to grab correct coordinates#22
willthamic wants to merge 1 commit into
kepano:mainfrom
willthamic:patch-1

Conversation

@willthamic

Copy link
Copy Markdown

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"}}

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant