Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User zikosoft's Avatar
    Join Date
    Nov 2012
    Posts
    1
    Hello,

    Can any one find a solution for conflict with Motools ?


    The map is showen but only like a printscreen(without fonctionnalities ..) when i survol it i have this error message:


    Uncaught TypeError: Cannot read property 'indexOf' of undefined file.js:1612
    Uncaught TypeError: Object #<MouseEvent> has no method 'clone' map-js-p2d-canvas.js:42


    Thank you

    Best regards

  2. #2
    Nokia Developer Moderator jasfox's Avatar
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    225
    Yes there is a conflict, it is to do with both libraries overriding the clone function for arrays. Unfortunately this is vital for the Nokia Maps event system so the result is a static map (and a load of JavaScript errors.) I'm not sure if it helps, but I can get the map to react to events by removing five lines from the mootools-core-1.4.5-full-compat.js library instead.

    Firstly ensure the Nokia Maps library loads first by declaring it first i.e.:

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml">
    	<head>
    		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    		<meta http-equiv="X-UA-Compatible" content="IE=7; IE=EmulateIE9" />
    		<title>Premiership: Nokia Maps with Mootools</title>
    		
    		<script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.3/jsl.js?with=all"></script>
    		<script type="text/javascript" src="mootools-core-1.4.5-full-compat.js"></script>
    ...etc
    Secondly comment out the following in the mootools-core-1.4.5-full-compat.js file:

    Code:
    /*
    Array.implement('clone', function(){
    	var i = this.length, clone = new Array(i);
    	while (i--) clone[i] = cloneOf(this[i]);
    	return clone;
    });*/
    The map will then work, I'm not sure of the effect on the Mootools codebase since this means the system is using the Nokia Maps version instead.
    Jason Fox
    Technical Support Engineer, Maps Platform
    Location & Commerce

    http://developer.here.net/

  3. #3
    Registered User kolizz's Avatar
    Join Date
    Dec 2012
    Posts
    1
    I encountered the same problem while trying out the Maps API and gave your suggested solution a shot, but Mootools broke really bad with its clone implementation gone. I'm not really going to switch out Mootools for this so it sadly means the Maps API is useless to me until it's fixed. And I do think it should be fixed in the Maps API — a general purpose library like Mootools is the only one I'd like to have fiddling around with standard library objects.

Similar Threads

  1. Replies: 5
    Last Post: 2012-05-30, 15:54
  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