I am using the Geolocation module and I have created a custom content type (we'll call it Bookshop), which contains a field called location and is of type Geolocation.
I can already programmatically create the custom content type instance and programmatically populate the title field.
$node=Node::create( 'title'=>'Shop 1' ); $node->save();
How would I go about populating the the Geolocation field content (e.g. the longitude and latitude fields in the Geolocation field)? e.g.
$node=Node::create( 'title'=>'Shop 1' 'Geolocation field'=>array ('latitude'=>'1', 'longitude'=>'2.33'), );
An approach such as the one above does not appear to work?