Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Nokia Developer Expert jcovert's Avatar
    Join Date
    May 2012
    Location
    Chicago
    Posts
    1
    The default "Map View" basemap used with the Maps API for developers is very different from the basemap seen at maps.nokia.com. What is the reason for this, and is there any way to access THAT basemap in my app instead?

    Example:
    http://i45.tinypic.com/msj7tw.png

    Thanks!
    Jim

  2. #2
    Nokia Developer Moderator jasfox's Avatar
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    228
    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.
    Jason Fox
    Technical Support Engineer, Maps Platform
    Location & Commerce

    http://developer.here.net/

Similar Threads

  1. Please help!!! When Kurdistan maps will be supported by nokia maps
    By mohammed_dizay in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2012-04-24, 14:25
  2. Is there a way to convert Maps Data from Nokia Maps 3 to be compatible with N Maps 2
    By dimchopicha in forum General Development Questions
    Replies: 6
    Last Post: 2011-01-09, 17:50
  3. Navigation route coordinates from Nokia Maps or Ovi Maps
    By selimsolmaz in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2010-03-04, 10:02
  4. Replies: 3
    Last Post: 2010-03-03, 10:25
  5. Problems installing maps on nokia maps.
    By arthursr in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2009-02-11, 13:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved