×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    3

    How to open Nokia Maps from HTML web browser

    Hi guys,

    I hope you can help me with some issues that I have with some Lumia devices. I am developing a web application for mobile devices. In some web pages is needed to open a native maps application (depending by platform it could be Bing Maps, Google Maps, etc...) and to plot a route. This should be implemented in different way from platform to platform. For ex. for Android it was achieved very easy by using a simple url like this ("http://maps.google.com/?saddr=...") and a user can choose to open a web browser or a native Google Maps application. For Windows Phone I found that there is a way to open the native maps with a "maps:" scheme uri. I was not able to plot a route with this, but I was able to open the native maps and to show the destination point on it (for ex. you can show a location by specifying the lat/lon in this way: <a href="maps:61.503106 23.761072">, it shows a location from Finland, Tampere), which finally was an accepted solution. This was tested with a Samsung phone with WP 7.5 and this worked properly. When I have tested with some Nokia devices I found that "maps:" protocol still open the Bing Maps application and not Nokia Maps (how I expect to be) and even so this is not working on all Lumia devices. It works properly for Lumia 920 device (exactly like on Samsung Omnia 7) and it not work for Lumia 620 and Lumia 820 models. I mean by not working that it still open a Bing Maps application but it is not able to show correctly the requested location, it shows always some last location opened by user somehow.
    My questions to you are:
    1. Is there a way to open the native Nokia Maps from web browser and to plot a route on Nokia Lumia devices?
    2. What I am doing wrong with "maps:" URI schema that is working well on Samsung, HTC, Lumia 920 and not on Lumia 620 and Lumia 820?

    I hope you can give me some hints about these issues or at least to forward me at the proper location where I can find some answers.

    Thanks.

  2. #2
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: How to open Nokia Maps from HTML web browser

    The interaction between the web browser on a device and and the start-up of an alternative app is a matter for the installed browser software and firmware and is very likely to vary from device to device. It can't be guaranteed that one method will work across all devices/browsers.


    Taking your Google Map deep-link example, it gives your preferred option on Android, since I assume that the Chrome mobile browser software recognizes this as a special case, however enter the same URL on the IE10 browser on a Lumia result is a request sent to maps.google.com . The back-end server will check the client string and forward to the online mobile m.maps.google.com - therefore on Windows Phone you won't get the Native HERE Maps app but will open Google's Mobile Map website instead (convoluted example I know).

    The equivalent services for HERE Maps are here.com and m.here.com

    There are several equivalent URL schemas you could look at to open a HERE Map. Now if you want the most Generic working version, then you'll need to look at the urls of the Map Image API. Provided you don't include the "no redirect" nord parameter, then the following order of options should occur:
    • If the client is recognized as HTML5 capable and there is no nord (no redirect) and no points of interest (POIs), the client will be redirected to a non-static service.
    • If the client is not recognized as mobile and there is no nord and no POIs, the client will be redirected to a non-static service.
    • If you include the nord parameter, you will always get a static image.

    On the 920 I just tested http://m.nok.it/?c=52.378,13.520 opened the HERE Maps app with a marker.

    Your second alternative would be to investigate the use of deep-links in HERE.com, the whereis parameter gives your preferred option of opening the "native" HERE maps application and supports geocoding. In this case the drive doesn't forward to HERE drive yet, but still displays routing instructions on screen.

    The best way I've found of generating these urls is to go to here.com and:
    • right click on the map
    • Select select share this location
    • Paste the shortened url back into the browser
    • Edit the result and see what happens - you can alter the title as necessary.


    Finally there is an archived article which explains the background behind deep-linking which was written before the deep-links were publically available, this may help in your URL generation as well.

  3. #3
    Registered User
    Join Date
    Jun 2013
    Posts
    3

    Re: How to open Nokia Maps from HTML web browser

    HI. Thanks for your quick response.
    I am agree that the interaction between the web browser and native application is a matter of installed software browser and firmware, but between the Lumia 920 and Lumia 620 I thought is the same browser and the same firmware. On Lumia 920 the "maps:" schema is working and on Lumia 620 not working.

    Regarding to Map Image API I tried what you said and I was able to open the native Nokia Maps with a marker (which for me have a meaning of destination). By exploring Map Image API I was not able to find a way to construct a route between two point. For Windows Phone platform (not Nokia devices) I choose the "maps:" URI schema because I am able to open the Bing Maps with a marker and the user can choose from menu directly an option which plot a route between the user current position and to the opened marker. So, it is somehow an acceptable solution even if the preferred one would be to create a route directly. Unfortunately I cannot do this with Map Image API because I cannot see a easy option for a user to create a route from his position to the opened marker.

    With the deeplink described by you I was able to plot a route from one point to another but only opening here.com maps and not a native one. Are you saying with this "the whereis parameter gives your preferred option of opening the 'native' HERE maps" that there should be a way with deeplink to open and to plot a route with a native Nokia Maps application from a HTML 5 web browser?

    Thanks.

  4. #4
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    288

    Re: How to open Nokia Maps from HTML web browser

    On Lumia 920 the "maps:" schema is working and on Lumia 620 not working.
    Whether the maps: schema is supported yet in a specific device/browser combination is nothing you nor I can do anything about directly unfortunately - we'll just have to wait for a 620 firmware update. I can only suggest potential workarounds using the current version(s) of the publicly available HERE Maps APIs - whether a particular url schema is supported in a browser (or how to add it) is not my area I'm afraid.

    Map Image API ... not able to find a way to construct a route between two point.
    The Map Image was initially developed as a simple HTTP request/response to display a static map and does not have a routing capability in itself. The fact that it has since been updated to work as a HERE Maps app launcher is incidental. This is the reason I suggested the HERE.com deep links may be of more use to you (or even m.here.com deeplinks for an online HMTL5 workaround).

    chose maps: URI schema because I am able to open the Bing Maps
    I guess this is because of support of the following: http://msdn.microsoft.com/en-us/libr.../jj635237.aspx at least in WP7. You may also find this StackOverflow thread useful

    deeplink .... plot a route ... but only opening here.com maps and not a native one.
    Yes that is what I mean't by "in this case the drive doesn't forward to HERE drive yet"

    ... the whereis parameter... is there a way with deeplink ... plot a route with a native Nokia Maps application from a HTML 5 web browser?
    All I'm saying here is that the whereis bit in here.com deeplinks provides an easy method to geocode an address. Under the covers any apps and APIs will use lat/longs anyway, and ideally you should convert to these at the earliest opportunity.

    So in summary, at the moment I can only offer workarounds to potentially launch HERE Maps at a specified point. It is possible to link to display a route from here.com (or more likely in your case m.here.com but I haven't yet found a way of opening a route with the onboard app. You may need to look into ms-drive-to or ms-walk-to URI schemes
    Last edited by jasfox; 2013-06-14 at 08:40.

  5. #5
    Registered User
    Join Date
    Jun 2013
    Posts
    3

    Re: How to open Nokia Maps from HTML web browser

    Hi. I just test with ms-drive-to and ms-walk-to URI schemes and it looks great, it is working exactly how I am expected to be. The ms-walk-to schema open the native Nokia Maps and plot a route from current location to a desired destination. The ms-drive-to the same like above, just that open Nokia Drive. This was tested with Nokia Lumia 620. These two URI schemes are very useful.

    In the mid time I have discovered why for Lumia 620 and 820 the "maps:" schema didn't work (actually it open the Bing Maps but it is not able to localize the requested coordinates). Actually the issue was that on those two phones the Language+Region -> Browser & Search Language option was setted to "Finnish (Finland)". If you switch this option to English the "maps:" schema is working properly. I have no idea still why this is happening but I will try to understand why.

    But now for Nokia Phones with WP8 I will use the ms-drive-to and ms-walk-to URI schemes.

    Thanks a lot, this discussion was very useful for me and I really got a proper solution for my project.

    Dan

Similar Threads

  1. Safari Browser, check boxes and Nokia Maps
    By Ulala in forum [Archived] Maps API for Javascript
    Replies: 22
    Last Post: 2012-05-19, 13:29
  2. Replies: 2
    Last Post: 2012-05-07, 15:12
  3. Replies: 2
    Last Post: 2010-05-25, 05:14
  4. Nokia E90 Maps - Settings - Network wont open
    By owaissiv in forum General Development Questions
    Replies: 9
    Last Post: 2008-08-21, 10:18
  5. HTML limitations for Nokia 9210 www browser
    By Nokia_Archive in forum Symbian
    Replies: 1
    Last Post: 2002-05-31, 19:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×