nextzen/nextzen.js

L.Mixin.Events: this problem will be moved in future release ...

arthur-clifford opened this issue · 3 comments

I know that you are or were aware of the dperecation of L.Mixin.Events but I'm getting five warnings when the map loads in my application. They are harmless in terms of current performance but I thought I'd share the stack traces so you can see whether the problem is a MapZen issue or a Leaflet issue.

I'm using leaflet-1.2 and the current mapzen standalone js from about five minutes ago, so still an issue in standalone if you think you fixed it. I'm also using tangram but tangram doesn't seem to be an issue in these warnings.

In the output below I've replaced identifying information in the urls with *** with the thought that the important part is the scripts and their line numbers.

I hope this helps ...

First Warning:
Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. Error
at checkDeprecatedMixinEvents (https:///lib/leaflet-1.2.0/leaflet-src.js:401:47)
at Function.Class.extend (https://
/lib/leaflet-1.2.0/leaflet-src.js:329:3)
at https:///lib/mapzen.standalone.js:4516:29
at Object. (https://
/lib/mapzen.standalone.js:4733:3)
at Object.22../formatter (https:///lib/mapzen.standalone.js:4735:4)
at s (https://
/lib/mapzen.standalone.js:1:620)
at https:///lib/mapzen.standalone.js:1:671
at https://
/lib/mapzen.standalone.js:3743:18
at Object. (https:///lib/mapzen.standalone.js:4084:3)
at Object.17../itinerary (https://
/lib/mapzen.standalone.js:4086:4)

Second Warning
leaflet-src.js:399 Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. Error
at checkDeprecatedMixinEvents (https:///lib/leaflet-1.2.0/leaflet-src.js:401:47)
at Function.Class.extend (https://
/lib/leaflet-1.2.0/leaflet-src.js:329:3)
at https:///lib/mapzen.standalone.js:4743:32
at Object. (https://
/lib/mapzen.standalone.js:4867:3)
at Object.23 (https:///lib/mapzen.standalone.js:4869:4)
at s (https://
/lib/mapzen.standalone.js:1:620)
at https:///lib/mapzen.standalone.js:1:671
at https://
/lib/mapzen.standalone.js:3744:13
at Object. (https:///lib/mapzen.standalone.js:4084:3)
at Object.17../itinerary (https://
/lib/mapzen.standalone.js:4086:4)

Third Warning
leaflet-src.js:399 Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. Error
at checkDeprecatedMixinEvents (https:///lib/leaflet-1.2.0/leaflet-src.js:401:47)
at Function.Class.extend (https://
/lib/leaflet-1.2.0/leaflet-src.js:329:3)
at https:///lib/mapzen.standalone.js:4328:27
at Object. (https://
/lib/mapzen.standalone.js:4456:3)
at Object.20../autocomplete (https:///lib/mapzen.standalone.js:4458:4)
at s (https://
/lib/mapzen.standalone.js:1:620)
at https:///lib/mapzen.standalone.js:1:671
at https://
/lib/mapzen.standalone.js:5963:24
at Object. (https:///lib/mapzen.standalone.js:6314:3)
at Object.26../geocoder-element (https://
/lib/mapzen.standalone.js:6316:4)

Fourth Warning
leaflet-src.js:399 Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. Error
at checkDeprecatedMixinEvents (https:///lib/leaflet-1.2.0/leaflet-src.js:401:47)
at Function.Class.extend (https://
/lib/leaflet-1.2.0/leaflet-src.js:329:3)
at https:///lib/mapzen.standalone.js:5966:40
at Object. (https://
/lib/mapzen.standalone.js:6314:3)
at Object.26../geocoder-element (https:///lib/mapzen.standalone.js:6316:4)
at s (https://
/lib/mapzen.standalone.js:1:620)
at https:///lib/mapzen.standalone.js:1:671
at https://
/lib/mapzen.standalone.js:3745:13
at Object. (https:///lib/mapzen.standalone.js:4084:3)
at Object.17../itinerary (https://
/lib/mapzen.standalone.js:4086:4)

Fifth Warning
leaflet-src.js:399 Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead. Error
at checkDeprecatedMixinEvents (https:///lib/leaflet-1.2.0/leaflet-src.js:401:47)
at Function.Class.extend (https://
/lib/leaflet-1.2.0/leaflet-src.js:329:3)
at https:///lib/mapzen.standalone.js:7270:32
at Object. (https://
/lib/mapzen.standalone.js:7407:3)
at Object.32 (https:///lib/mapzen.standalone.js:7409:4)
at s (https://
/lib/mapzen.standalone.js:1:620)
at https:///lib/mapzen.standalone.js:1:671
at Object. (https://
/lib/mapzen.standalone.js:8689:18)
at Object.42../apiKeyCheck (https:///lib/mapzen.standalone.js:8766:4)
at s (https://
/lib/mapzen.standalone.js:1:620)

Hi! Thanks for the issue!
We've been trying to selectively include L.mixin only when L.Evented is missing. However, mapzen.js has some dependencies ( Leaflet Routing Machine is one example. There is an already an open issue on the repo about this. ) using L.mixin. We are keeping our eyes on the dependencies we are using, will make sure mapzen.js works in harmony with them!

Leaflet guys seem to have fixed this. Any idea if this will be fixed in the mapzen.js soon?

I think Leaflet Routing Machine's change is merged to master branch, but not released yet. (mapzen.js is using 3.2.7) Once that fix is released, the next mapzen.js release will pick up the change.