The "cool pink" base map will be used automatically if you upgrade your application to use API 2.2.x or higher. Assuming you are using Nokia Maps 2.0.x or 2.1.x , This should just be a matter of altering the URL of the library you have loaded. The change in the middle digit indicates a potential code break, so you will have to update your script elsewhere as necessary.
Assuming you are using 2.1.x upgrade path is as follows:
Replace :
Code:
<script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.1.0/jsl.js">
</script>
with:
Code:
<script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.0/jsl.js">
</script>
and replace the old authentication code:
Code:
nokia.maps.util.ApplicationContext.set(
{"appId": "YOUR APPID", "authenticationToken": "YOUR TOKEN"});
with:
Code:
nokia.Settings.set( "appId", "YOUR APPID");
nokia.Settings.set( "authenticationToken", "YOUR TOKEN");
Goecoding and Reverse geocoding
The main item which have changed in the new release is the fact that search is purely the responsibility of places in the new API. This should improve search results, but does mean a code break has occurred. If you use geocoding or Reverse geocoding then you'll need to alter the following:
Change:
Code:
var manager = new nokia.maps.search.Manager();
var onManagerStateChange = function (observedManager, key, value) {
var location = observedManager.locations[0];
...etc
}
manager.addObserver("state", onManagerStateChange);
manager.geocode(addresses[i]);
To:
Code:
var searchManager = nokia.places.search.manager;
searchManager.geoCode({
searchTerm: addresses[i],
onComplete: function (data, requestStatus, requestId) {
var location = data.location;
...etc
}
});
for full details look at the difference between
If you are still using the old Ovi Maps library, you'll also need to replace any instances of ovi.mapsapi in the code with nokia.maps since from 2.0.x onwards all objects are created in a different namespace, as well.