can I pass multiple parameter on click event function ? If yes then how to pass parameter .. when I pass parameter callback error are displaying.
Example :
var ID = 2;
MapClick.on('click', onMapClick(ID));
function onMapClick(ID) {
alert(ID);
}
This is a JavaScript question, not a Leaflet bug — please ask similar questions on the forum instead.
One way is to do MapClick.on('click', L.bind(onMapClick, null, ID)).
Hi Vladimir ,
It's working, Thanks for help.
Regards,
Hemant
On Thu, Dec 12, 2013 at 6:46 PM, Vladimir Agafonkin <
[email protected]> wrote:
Closed #2286 https://github.com/Leaflet/Leaflet/issues/2286.
—
Reply to this email directly or view it on GitHubhttps://github.com/Leaflet/Leaflet/issues/2286
.
Most helpful comment
This is a JavaScript question, not a Leaflet bug — please ask similar questions on the forum instead.
One way is to do
MapClick.on('click', L.bind(onMapClick, null, ID)).