Delete()

Description:

The Delete method deletes a landmark or landmark category from a landmark database.

Note: You cannot delete landmark databases.

This is a synchronous method.

Syntax:

Delete(parameters:Object):Object

Arguments:

  • parameters:

    This is an object that specifies the landmark or landmark category to delete. For more information about the object properties and how to define them, see section Parameters for deleting landmark information.

Return value:

The Delete method returns an object that contains an error code and an error message.

Table: Return value properties for Delete

Property

Description

Value

ErrorCode

This is a number that specifies a predefined error code.

See Service API error codes.

ErrorMessage

This is a text string that describes the error.

Remarks:

  • If no landmark database is specified, Delete is performed on the default database. If the default database does not exist, it is created and set active, but no delete operation is performed. The default database is file://c:eposlm.ldb.

  • For more information about landmarks, landmark categories, and landmark databases, see the Landmarks Service overview page.

Example code:

The following sample code illustrates how to delete the landmark corresponding to the specified ID:

import com.nokia.lib.Service;
var landmark = new Service("Service.Landmarks", "IDataSource");
var landmarkId = {id:landmarkid}; // must be a valid landmarkId which is a String
var inParams = {Type:"Landmark", Data:landmarkId};
var outParams = landmark.Delete(inParams);
var errorId = outParams.ErrorCode; // various possible errorcodes