Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User LJQian's Avatar
    Join Date
    Jul 2012
    Posts
    2
    Experts,
    I need to find a way in my application code to detect that the nokia JS map API code has been loaded into the browser. With other maps API such as google maps, I can attach a callback function to the end of the Script URL like:
    http://maps.google.com/maps/api/js?s...shLoadGoogleJs

    where the function myApp.finishLoadGoogleJs() is part of my application code, but is invoked as soon as the google JS api library finishes loading, so my app can do some initialization based on this notification.

    I urgently need to figure out a way to do the same with the Nokia JS URL:

    http://api.maps.nokia.com/2.2.0/jsl....ishLoadNokiaJS

    If no such callback mechanism is currently in place, is there any known/public Nokia map object that I can detect its existence and use as an indication that the Nokia JS lib has been loaded into the page?

    thanks
    LJ

  2. #2
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    Hi

    nokia.Features.load allows you to load a feature and specify a function callback to be notified after the loading succeeds of fails. I think that is what you need

  3. #3
    Registered User LJQian's Avatar
    Join Date
    Jul 2012
    Posts
    2
    Thanks. It looks like we could use nokia.Feature.isLoaded() to check if the 'map' feature has been loaded into browser. It requires two parameters, the first I assume we can use 'map' in this case, but what should be the value for the second param (featureImplName) ?

    Thanks

  4. #4
    Nokia Developer Expert izinin's Avatar
    Join Date
    Oct 2007
    Posts
    441
    Hi

    To start using Maps API you have to load it with loader . Maps API is modular and you can select feature set to load . Mentioned before loader can accept a callback function to notify about the loader work. That is the scheme.

    I don't think you can find somewhere in the documentation the feature list and use a feature use checking by name. I do not know if featureImplName is documented somewhere. Definitelly you can read already loaded feature list and obtain some value back -- but i do not see any use in it.

    To check whether you components are loaded i suppose to use nokia.Features.load with event callback -- you do not need to know featureImplName in that case. I suppose feature listing is kind of the API extension support-

    Please check the documentation update on Features , apparently it gets more clear:

    Code:
    nokia.Features.load({
    	"map": "auto",
    	"search": "auto"
    }, onSuccess, onError);

  5. #5
    Registered User yann.debonnel's Avatar
    Join Date
    Oct 2012
    Posts
    1
    I am also trying to load the Nokia Maps api in a non-blocking matter. Does anyone have a working example of this ?

Similar Threads

  1. Opening maps application with a link? (maps: protocol?)
    By johnboxall in forum Browsing and Mark-ups
    Replies: 6
    Last Post: 2011-04-02, 13:36
  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. N97 Mini Map Loader using Mac OS X failed to load maps
    By firdousamir in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2010-08-24, 14:58
  4. Replies: 2
    Last Post: 2010-03-02, 18:34
  5. Load Images like google maps
    By Olimlad in forum Mobile Java General
    Replies: 5
    Last Post: 2008-05-15, 09:58

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