1

I am new Lightning Experience, I implemented map using leaf_let when run the code found following error.

   Uncaught TypeError: Cannot read property 'deviceXDPI' of undefined
throws at /resource/leaflet/leaflet.js:4:6978
    at Error (native)
    at Iy.<anonymous> (https://growerslightning-dev-ed.lightning.force.com/auraFW/javascript/XyhLNaMJXc3t5qwu_xzuTA/aura_prod.js:153:22)
    at new Iy (https://growerslightning-dev-ed.lightning.force.com/auraFW/javascript/XyhLNaMJXc3t5qwu_xzuTA/aura_prod.js:153:296)
    at Object.handler_aura_systemError (https://growerslightning-dev-ed.lightning.force.com/l/%7B%22mode%22%3A%22PROD%22%2C%22app%22%3A%22one%3Aone%22%2C%22fwuid%22%3A%22XyhLNaMJXc3t5qwu_xzuTA%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fone%3Aone%22%3A%22LpC4IEwqmgPMoQPKh1C1EA%22%7D%2C%22requestedLocales%22%3A%5B%22en_US%22%2C%22en%22%5D%2C%22ls%22%3A%22E%22%7D/app.js:5057:225)
    at https://growerslightning-dev-ed.lightning.force.com/l/%7B%22mode%22%3A%22PROD%22%2C%22app%22%3A%22one%3Aone%22%2C%22fwuid%22%3A%22XyhLNaMJXc3t5qwu_xzuTA%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fone%3Aone%22%3A%22LpC4IEwqmgPMoQPKh1C1EA%22%7D%2C%22requestedLocales%22%3A%5B%22en_US%22%2C%22en%22%5D%2C%22ls%22%3A%22E%22%7D/app.js:3512:244
    at Object.handleEvent (https://growerslightning-dev-ed.lightning.force.com/l/%7B%22mode%22%3A%22PROD%22%2C%22app%22%3A%22one%3Aone%22%2C%22fwuid%22%3A%22XyhLNaMJXc3t5qwu_xzuTA%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fone%3Aone%22%3A%22LpC4IEwqmgPMoQPKh1C1EA%22%7D%2C%22requestedLocales%22%3A%5B%22en_US%22%2C%22en%22%5D%2C%22ls%22%3A%22E%22%7D/app.js:3511:338)
    at handleDelegatedEvent (https://growerslightning-dev-ed.lightning.force.com/l/%7B%22mode%22%3A%22PROD%22%2C%22app%22%3A%22one%3Aone%22%2C%22fwuid%22%3A%22XyhLNaMJXc3t5qwu_xzuTA%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fone%3Aone%22%3A%22LpC4IEwqmgPMoQPKh1C1EA%22%7D%2C%22requestedLocales%22%3A%5B%22en_US%22%2C%22en%22%5D%2C%22ls%22%3A%22E%22%7D/app.js:3509:72)
    at G.oc (https://growerslightning-dev-ed.lightning.force.com/auraFW/javascript/XyhLNaMJXc3t5qwu_xzuTA/aura_prod.js:274:169)
    at https://growerslightning-dev-ed.lightning.force.com/auraFW/javascript/XyhLNaMJXc3t5qwu_xzuTA/aura_prod.js:228:72
    at https://growerslightning-dev-ed.lightning.force.com/auraFW/javascript/XyhLNaMJXc3t5qwu_xzuTA/aura_prod.js:264:424

Any suggestion will be thankful.

  • isnt that a leafletjs issue? – kurunve Jun 13 '16 at 6:52
  • You could use your browser's debugger to set a breakpoint at line 6978 of leaflet.js to figure out what value is undefined. Pretty impossible for anyone here to be able to help with the question as it stands. – Keith C Jun 13 '16 at 9:32
  • This issue is specific to Leaflet.js combined with Locker Service - known issue that already has a fix in the next patch. In addition there is another unresolved issue with LS combined with Leadlet that causes the map tiles to not be positioned correctly that is under investigation. In Develoer Edition orgs you can disable the critical update for Locker Service under Setup. – Doug Chasman Jun 13 '16 at 10:52