I am trying to incorporate multiple maps on my page, including both 2Gis and Leaflet. The 2Gis map is functioning properly, as it is based on the Leaflet library. However, I am encountering an issue with Leaflet when it is used in conjunction with 2Gis. The error message I receive is:
"TypeError: Leaflet.tileLayer.Unwired is not a function" at this line:
var myLeafletStreets = Leaflet.tileLayer.Unwired({ // <- ERROR HERE
It appears that there is a conflict between the two libraries, but I am having trouble identifying the exact source of the conflict.
For reference, here is a fiddle with the issue: https://jsfiddle.net/tL31gnxz/
If I remove the 2Gis component:
DG.then(function() {
InitTwoGisMap();
});
the Leaflet map loads without any problems.
I have tried using:
var Leaflet = L.noConflict();
to no avail.