Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

(Difference between revisions)

Archived:Ovi Maps API - Getting the ID of Components attached to a map

From Wiki
Jump to: navigation, search
jasfox (Talk | contribs)
(Jasfox - Archive)
hamishwillee (Talk | contribs)
m (Text replace - "[[Category:Nokia Maps" to "[[Category:HERE Maps")
Line 1: Line 1:
[[Category:Nokia Maps]][[Category:JavaScript]]
+
[[Category:HERE Maps]][[Category:JavaScript]]
  
 
{{Archived|timestamp=20130201151019|user=[[User:Jasfox|Jasfox]]| The Ovi Maps API has been superceded by the Nokia Maps API.
 
{{Archived|timestamp=20130201151019|user=[[User:Jasfox|Jasfox]]| The Ovi Maps API has been superceded by the Nokia Maps API.

Revision as of 03:22, 24 April 2013


Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The Ovi Maps API has been superceded by the Nokia Maps API. The Nokia Maps API v2 is the successor of the Ovi Maps API. The latest version of the API can be found here.

Article Metadata
Tested with
Devices(s): Google Chrome 11.0x, Mozilla Firefox 5.0
Article
Created: Maveric (21 Jun 2011)
Last edited: hamishwillee (24 Apr 2013)
See Also

Contents

Introduction

Within the code, it maybe useful to find out what are the Components that currently are attached to a map display instance.

Prerequisites

Ovi Maps API supported web browser (basically any modern web browser)

The example assumes you have already added the Ovi Maps to your web page as explained in the previous article "Ovi Maps - add the map to any web page"

Important about Maps credentials

With Ovi Maps API you can start without having any credentials given, but you might face a performance gap. In order to get the full potential out of the offering, you must get the credentials that authenticate your application against the Services. Please read through the Location API.

For more information on how to obtain the credentials, please start with the Ovi Maps API Developers Guide section "Acquiring API credentials"

Implementation

The API reference states:

getId () : String // Returns a unique identifier of the Component. It is not allowed to add two Components with the same id to a map.

So, If previously created a component variable type of Copyright, the getId would return:

result = component.getId()

The result would have the value of string "Copyright".

It is also possible to query the component's version.

The API reference states:

getVersion () : String

Returns the version of the component. The version of the component in the format "major.minor.update.revision" where the values may be omitted from right to left. This scheme should be used to make version numbers comparable.

result = component.getVersion


For more on Ovi Maps API

For reference the old Ovi Maps API documentation is archived here:

For the latest Nokia Maps API full documentation and API reference here:

You may also access the interactive API explorer

Tested with

Google Chrome 11.0x Mozilla Firefox 5.0

613 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×