Closed (fixed)
Project:
Migrate Extras
Version:
7.x-2.x-dev
Component:
Geofield
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
6 Aug 2012 at 11:33 UTC
Updated:
18 Oct 2012 at 20:41 UTC
I am current migrating lat/lng values in separate fields as so..
$this->addFieldMapping('field_prop_lat', 'LAT');
$this->addFieldMapping('field_prop_lng', 'LNG');
but now need a geofield which contains both lat and lng values (in order for search_api_location module to work). is there any way to map geofields?
Comments
Comment #1
mikeryanThe Migrate module itself does not have support for contrib modules - that goes, ideally, into the contrib module itself, or if that's not practical into the Migrate Extras module. As it happens, Migrate Extras does have support for geofield - install and enable it, and see geofield.inc for help on mapping.
Comment #2
farse commentedthanks a lot for that. i have been having a play at it and this is what my old code looked like with separate fields
now my new field is called field_data_field_latlng and this is what I have now:
this doesn't seem to work and i'm a bit confused by the $geo_arguments as
where I'm not sure if in my case 'source_field' is the same as 'source_field_latitude' as my LAT value is just a column from the whole table i'm migrating from. i tried also,
but i don't think that works either. i'm sure i'm missing something here?
thanks.
Comment #3
farse commentedComment #4
mikeryanThe last one there is almost right, but it's 'source_field', not 'source_table'. And, the second one should be 'LNG', not 'LAT', correct?
Comment #5
farse commentedoh god ya, how embarrasing, so should it be:
since my source_field is the same as source_field_lat/lng?
did this and no apparent errors seem to be showing (under mapping tab):
field_latlng Point OK
LAT OK
LNG OK
but when i update the migration, nothing seems to migrate to the geofield... (after indexing and clearing caches)
Comment #6
farse commentedComment #7
mikeryanComment #8
mikeryan