Why can't I programatically create a location field in a node? I'm trying to programmatically create a node with a location field, but I'm not able to do it. I have done it in a similar project and it works fine. I use the Entity API module to create the nodes, with this code.

 $localizationmap = array(
   'latitude' =&gt; $item['field_mapa']['latitude'],
   'longitude' =&gt; $item['field_mapa']['longitude'],
   //other elements added here (province, postal_code, country [es, en,...],additional, ...)
 );
 $entity-&gt;field_mapa-&gt;set($localizationmap);


I checked the values that are given to the array and they're OK. 
Drupal log contains the following error:


  EntityMetadataWrapperException: Unknown data property field_mapa. en
  EntityStructureWrapper->getPropertyInfo() (línea 335 de
  /var/www/vhosts/drupal/litoral.interdigital.biz/sites/all/modules/entity/includes/entity.wrapper.inc).


field_mapa exists and it is the name of the location field I'm trying to fill.

What am I doing wrong?
It's simply because the stable version of the Location module doesn't support Entity API.

There's a patch here that claims to provide the missing support, obviously use with caution on a dev version of the site first.