Using Plus codes in a semantic web perspective

73 views
Skip to first unread message

infeu...@gmail.com

unread,
Jan 23, 2019, 6:11:10 AM1/23/19
to Plus Codes Community Forum
Hello,

Providing relevant data to search engines is my duty as web developer. In this context, Plus codes may be inserted in a web page:
  • in the <body> section, as a link to show directions to reach some place

    <p>Here is <a href="https://plus.codes/8FX8J423+PM" title="Google map with the location of our office" rel="nofollow">a Google map</a> displaying our office location.</p>

  • in the <head> section, as a schema.org hasMap property (https://schema.org/hasMap) for the schema.org Map type (https://schema.org/Map)

    <script type="application/ld+json">
    {
     
    "@context": "https://schema.org",
     
    "@type": "LocalBusiness",
     
    "description": "Some Company is a service provider based somewhere.",
     
    "name": "Some Company",
     
    "legalName": "Some Company Inc.",
     
    "vatID": "123456",
     
    "email": "mailto:in...@example.com",
     
    "priceRange": "€50-€5000",
     
    "currenciesAccepted": "EUR",
     
    "paymentAccepted": [
       
    "Visa",
       
    "Master Card"
     
    ],
      "hasMap": {
         
    "@type": "Map",
         
    "url": "https://plus.codes/8FX8J423+PM"

     
    },
     
    "contactPoint" : [
       
    { "@type" : "ContactPoint",
         
    "telephone" : "+123456789",
         
    "contactType" : "customer service"
       
    } ],
     
    "foundingDate": "2000",
     
    "foundingLocation": {
       
    "@type": "Place",
       
    "name": "Somewhere"
     
    },
     
    "containedInPlace": {
       
    "@type": "Place",
       
    "name": "Somewhere"
    },
     
    "image": {
       
    "@type": "ImageObject",
       
    "url": "https://example.com/images/image.png",
       
    "height": 1200,
       
    "width": 630
    },
     
    "@id": "https://example.com",
     
    "address": {
       
    "@type": "PostalAddress",
       
    "streetAddress": "Some street 1",
       
    "addressLocality": "Some city",
       
    "addressRegion": "AB-CD",
       
    "postalCode": "1234",
       
    "addressCountry": "AB"
     
    },
     
    "geo": {
       
    "@type": "GeoCoordinates",
       
    "latitude": 49.601781,
       
    "longitude": 6.104238
     
    },
     
    "url": "https://example.com",
     
    "telephone": "+123456789",
     
    "openingHoursSpecification": [
       
    {
         
    "@type": "OpeningHoursSpecification",
         
    "dayOfWeek": [
           
    "Monday",
           
    "Tuesday",
           
    "Wednesday",
           
    "Thursday",
           
    "Friday"
         
    ],
         
    "opens": "08:00",
         
    "closes": "17:00"
       
    }
     
    ]
    }
    </script>

Besides these uses, a JSON-LD file is generated with an URL (for instance https://plus.codes/api?address=49.601781,6.104238&email=infeu...@gmail.com) but the Google Structured Data Testing Tool flags it as an Unspecified Type:

<script type="application/ld+json">
{
 
"plus_code": {
   
"global_code": "8FX8J423+PM",
   
"geometry": {
     
"bounds": {
       
"northeast": {
         
"lat": 49.60187499999998,
         
"lng": 6.104249999999979
       
},
       
"southwest": {
         
"lat": 49.60174999999998,
         
"lng": 6.104124999999982
       
}
     
},
     
"location": {
       
"lat": 49.60181249999998,
       
"lng": 6.104187499999981
     
}
   
},
   
"locality": {}
 
},
 
"status": "OK"
}
</script>


The homepage of the Plus codes website mentions on its very first line that "A plus code is like a street address for people or places that don't have one". I know that the above examples do not enter in this category because they have a street address, but I also know that any geolocation related data is a matter of interest for Google (especially when it is provided by Google). Having said this, my question to the Plus Codes Community is the following: in a semantic web perspective, which are all the uses of the Plus codes?

Best regards,

Gilles Bailleux

Barry Hunter

unread,
Jan 23, 2019, 6:31:45 AM1/23/19
to infeu...@gmail.com, Plus Codes Community Forum
Well ultimately could just put in postal code (on the basis if the address has a real postal code, probably don't need the Plus Code) 

  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Some street 1",
    "addressLocality": "Some city",
    "addressRegion": "AB-CD",
    "postalCode": "8FX8J423+PM",
    "addressCountry": "AB"
  },

Or could just add it as a new component?

  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Some street 1",
    "plusCode": " 8FX8J423+PM",
    "addressCountry": "AB"
  },

Or just put in Geo? technically the Pluscode is just a presentation of the coordinate. 

  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 49.601781,
    "longitude": 6.104238,
    "plusCode": " 8FX8J423+PM",  
  },  


--
Public site: http://www.openlocationcode.com/
Github project: https://github.com/google/open-location-code
Demo site: http://plus.codes/
---
You received this message because you are subscribed to the Google Groups "Plus Codes Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-location-c...@googlegroups.com.
To post to this group, send email to open-loca...@googlegroups.com.
Visit this group at https://groups.google.com/group/open-location-code.
To view this discussion on the web, visit https://groups.google.com/d/msgid/open-location-code/38c2a805-e6d2-441b-9b2e-d844dc242666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

infeu...@gmail.com

unread,
Jan 23, 2019, 7:06:34 AM1/23/19
to Plus Codes Community Forum
Hello Barry,

Thank you for your proposals.

The schemas from schema.org rely on a structure which is rather strict: if the property of a schema type does not exist or if it is misspelled, it will generate an error.

Let us take your meaningful proposal for the PostalAddress type, which generates the following error when it is parsed by the Google Structured Data Testing Tool:
plusCode    8FX8J423+PM (The property plusCode is not recognized by Google for an object of type PostalAddress.)

There is indeed some proposals which could be transmitted to the schema.org team, for instance the plusCode property which you just proposed.

Best regards,

Gilles
Reply all
Reply to author
Forward
0 new messages