Attempt to implement plugins for Leaflet and got errors

  • Starting attempt to implement plugins for Leaflet, I got show stopper.

    If trying create instance of a map via using L.map, there is an exception, L.map is not a function, for the code below.

    Code
    function start()	{		var map = L.map("map");
    	}
    	var script = document.createElement("script");	script.src = "./eaflet.js";	script.addEventListener("load", start);


    The exception would became "Uncaught TypeError: Iterator value m is not an entry object" if replace L.map("map"); to new Map("map");


    The element, "map", is append to plugin.sprite


    the code above was triggered when load event of leaflet.js occured.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!