the token for latlon property will always get value 'Property latlon', and the token for schemaorg_shape will always get value 'Property schemaorg_shape'.

I think it's cause by wrong property type. In 'geofield.schemaorg.inc'

function geofield_data_property_info($name = NULL) {
...
    'latlon' => array(
      'label' => 'LatLong Pair',
      'type'  => 'string',<--------------------------------
      'getter callback' => 'geofield_return_latlon',
      'microdata' => FALSE,
    ),
    'schemaorg_shape' => array(
      'label' => 'Schema.org Shape',
      'type' => 'string', <--------------------------------
      'getter callback' => 'geofield_return_schemaorg_shape',
      'microdata' => TRUE,
    ),

I'm not familiar with drupal entity api, but according to the doc here Entity property information: Data Types, there is not a type name 'string'. 'text' should be a proper one.

Comments

clarkorz’s picture

Status: Active » Needs review
StatusFileSize
new657 bytes

changing property type from 'string' to 'text'

work for me.

das-peter’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

Just stumbled over this too.
Fixed it the same way - but thought I'll check the issue queue before creating another patch.
What I'm tempted to do is change the lat / lon properties from decimal (or maybe all the decimal properties) to integer - because the token values for the decimal type are rounded to 2 decimal points (See http://cgit.drupalcode.org/entity/tree/entity_token.tokens.inc#n320).
For coordinates this is a pretty serious loss on accuracy.

But as for now this is RTBC.