Path

ez projects / ezgmaplocation / forum / general / create a location within an...


create a location within an object which doesn't exist yet

You need to be logged in to post messages in the forums. New users may register here.

Clément Matéo

Member since:
23 February 2010

Posts: 21

Tuesday 06 September 2011 5:13:29 pm

Hi,

I'm trying to create a new object with a ezgmaplocation datatype, but I don't know how to initiate it. Could some one show me the tricks ?

Here a part from source code :

$params = array();
$params['class_identifier'] = 'implantation';
$params['creator_id'] = $user->attribute( 'contentobject_id' ); $params['parent_node_id'] = $parentNodeId->attribute( 'node_id' );
...

$attributesData = array ( ) ;
$attributesData['name'] = "name of implantation";
...
$attributesData['location'] = ???? :/
$params['attributes'] = $attributesData;

$contentObject = eZContentFunctions::createAndPublishObject( $params );

thank you
Up

Clément Matéo

Member since:
23 February 2010

Posts: 21

Wednesday 07 September 2011 6:42:07 pm

I found my way :)

$attributesData['location'] = "1|#lat|#lng|#addr";


works fine.

example :
$attributesData['location'] = "1|#46.487561|#23.45784|#an address";
Up

You need to be logged in to post messages in the forums. New users may register here.