×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    6

    Probleme wtih mailto: and nokai maps

    Hi,

    I have a problem with the map api for javascript : i have a link in the footer of my website where users can send mail to us.

    I have a <a href="mailto:exemple@mail.com" > when i click on it the map disappear. I have to refresh the page in order to see the map !

    it's normal ?


    thank you;)

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

    Re: Probleme wtih mailto: and nokia maps

    This is unlikely to be an API related problem, more likely a browser issue. You'll have to post some code and explain which browser/mail client combination is failing for you. The following snippet works fine for me on IE, FF, Chrome and Safari with outlook as my mail client. Your mileage may vary.

    Code:
        <html>
        <head>
        <script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.4/jsl.js?with=all"></script>
        <script>
        //Minimal Settings of the Nokia Maps this are the codes for MyMaps
        nokia.Settings.set("appId", "APP_ID");
        nokia.Settings.set("authenticationToken", "TOKEN");
         
        </script>
        </head>
        <body>
         
            <div id="map" style="position: relative; width: 90%; height: 400px; margin: auto;"></div>
         
        <script>
                            display = new nokia.maps.map.Display(document.getElementById("map"),
                            {
                                "components": [
                                                      new nokia.maps.map.component.ZoomBar(),
                                                      new nokia.maps.map.component.Behavior(),
                                                      new nokia.maps.map.component.TypeSelector()
                                ]
                            });
                           
        </script>
        
        <a href="mailto:example@mail.com" >LINK TO EMAIL </a>
        </body>
        </html>

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    6

    Re: Probleme wtih mailto: and nokia maps

    hi,


    thank you for your ansxer.


    I test your code and i have the same mistake with Chrome (version 26) and outlook as mail client.

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

    Re: Probleme wtih mailto: and nokia maps

    Just try typing mailto:example@mail.com directly in the Omnibox of the various browsers. If your browser is configured correctly, it should bring up a eMail dialog. If you can get that then the Map should be OK. Otherwise it looks like your protocol handlers need updating. Alternatively It may be a chrome 26 issue- very odd. Additionally I've just noticed that if I type mailto:example@mail.com directly in the Omnibox when the map is currently displayed as well then it disappears on another browser as well.(Firefox) but reappears when the dialog is dismissed.
    Last edited by jasfox; 2013-05-13 at 15:36.

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    6

    Re: Probleme wtih mailto: and nokai maps

    Hi, i try mailto:example@mail.com in the Omnibox of Chrome,Firefox and IE. With Firefox and Chrome, the map disappeared and never come back. With IE i have no problem.

    With firefox, When i click on the link in my page, the map is still displayed. (but not with chrome)

    EDIT : i also try one of your example website :http://developer.here.com/apiexplore...displayed.html and when i put mailto:example@mail.com in the Omnibox the map disappeared and never comes back.
    Last edited by rochedy; 2013-05-13 at 16:54.

  6. #6
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    289

    Re: Probleme wtih mailto: and nokai maps

    On investigation I've discovered that Chrome appears to fire the unload event whenever the mailto: protocol is fired in the Window. Annoyingly this is causing the map to unload - since it has been told to do so. There is a workaround available - just create a new self closing pop-up and set the mailto: URL in there.

    Code:
         
     <html>
        <head>
        <script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.4/jsl.js?with=all"></script>
        <script>
        //Minimal Settings of the Nokia Maps this are the codes for MyMaps
        nokia.Settings.set("appId", "APP_ID");
        nokia.Settings.set("authenticationToken", "TOKEN");
         
        </script>
        </head>
        <body>
         
            <div id="map" style="position: relative; width: 90%; height: 400px; margin: auto;"></div>
         
        <script>
                            display = new nokia.maps.map.Display(document.getElementById("map"),
                            {
                                "components": [
                                                      new nokia.maps.map.component.ZoomBar(),
                                                      new nokia.maps.map.component.Behavior(),
                                                      new nokia.maps.map.component.TypeSelector()
                                ]
                            });
                           
        </script>
        
        <script language="javascript" type="text/javascript">
    <!--
    function popitup(url) {
    	newwindow=window.open(url,'name','height=5,width=5');
    	setTimeout(function () { newwindow.close();}, 30);
    	if (window.focus) {newwindow.focus()}
    	
    	return false;
    }
    
    // -->
    </script>
        
        <a href="mailto:example.com" onclick="return popitup('mailto:example.com')" >LINK TO EMAIL </a>
        </body>
        </html>

  7. #7
    Registered User
    Join Date
    Apr 2013
    Posts
    6

    Re: Probleme wtih mailto: and nokai maps

    I test this code and it Works ;)

    Thank you very much !

Similar Threads

  1. Nokia Wtih Symbian or MeeGo
    By somnathbanik in forum General Development Questions
    Replies: 71
    Last Post: 2011-02-12, 17:13
  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. problem wtih log handling
    By prashantchougule.cs in forum Symbian
    Replies: 12
    Last Post: 2010-12-22, 14:23
  4. SMS 'mailto' counterpart in XHTML MP
    By triadrecords in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2009-10-20, 10:30
  5. Mailto: link to mail client
    By gusditz in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2003-05-12, 12:40

Posting Permissions

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