Search
Saturday
Sep122015

Workflow Example: Coordinates From Google Maps Share

This workflow is configured as an action extension. It is intended to receive map shares from the Google Maps app and to return some coordinate details for the location.

The workflow first checks to see if the input to it contains "/maps/" (which Google Maps shares do). If not it substitutes in example content from a Google Map share.

The URL passed in is first expanded (just to be sure we always have a full URL to work with) and then the initial part of the maps URL is stripped using a Replace Text action.

The first part (based on separation by forward slash ("/") of the remaining portion of the URL is taken and split based on the position of a comma. The variable Coordinates then contains the coordinate elements of the map location being processed.

Latitude is the first element and longitude the second. These are stored in other variables and the result (along with the original (expanded) URL) are displayed to the user via a Quick Look action.

Note also the use of the Set Name action to title the Quick Look window that is displayed.

References (2)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
  • Response
    Response: united states map
    The first part (based on separation by forward slash ("/") of the remaining portion of the URL is taken and split based on the position of a comma. The variable Coordinates then contains the coordinate elements of the map location being processed.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>