×
Namespaces

Variants
Actions
(Difference between revisions)

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

From Nokia Developer Wiki
Jump to: navigation, search
jasfox (Talk | contribs)
(Jasfox - Archive)
hamishwillee (Talk | contribs)
 
(2 intermediate revisions by one user not shown)
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.
 
The Nokia Maps API v2 is the successor of the Ovi Maps API. The latest version of the API can be found  [http://developer.here.net/javascript_api here].}}
 
The Nokia Maps API v2 is the successor of the Ovi Maps API. The latest version of the API can be found  [http://developer.here.net/javascript_api here].}}
  
{{ArticleMetaData
+
{{ArticleMetaData <!-- v1.2 -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
Line 11: Line 11:
 
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->  
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
+
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|translated-by= <!-- [[User:XXXX]] -->
 
|translated-by= <!-- [[User:XXXX]] -->
|translated-from-title= <!-- Title only -->  
+
|translated-from-title= <!-- Title only -->
 
|translated-from-id= <!-- Id of translated revision -->
 
|translated-from-id= <!-- Id of translated revision -->
|review-by=<!-- After re-review: [[User:username]] -->
+
|review-by= <!-- After re-review: [[User:username]] -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
|creationdate=20110621
+
|creationdate= 20110621
|author=[[User:Maveric]]
+
|author= [[User:Maveric]]
 
}}
 
}}
 
{{SeeAlso|
 
{{SeeAlso|
Line 45: Line 45:
 
offering, you must get the credentials that authenticate your application against the Services. Please read through the Location API.
 
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"
+
For more information on how to obtain the credentials, please start with the Ovi Maps API Developers Guide section "Acquiring API credentials"
  
 
==Implementation==
 
==Implementation==

Latest revision as of 09:39, 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

[edit] Introduction

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

[edit] 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"

[edit] 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"

[edit] 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


[edit] 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

[edit] Tested with

Google Chrome 11.0x Mozilla Firefox 5.0

This page was last modified on 24 April 2013, at 09:39.
80 page views in the last 30 days.
×