Closed bmcbride closed 11 years ago
Could you please explain how to use a console.log() or other functions fired by clickEvent on a lvector object?
@sentenza the clickEvent function allows you to do something other than open the standard popup when clicking on a feature. You could use it to open a custom modal window, open a web page, alert the user, anything you can dream up. The consol.log() example above simply logs the Street Address (from the street_add geojson property) to the browser's console. If you are not familiar with using the console, you could change it to alert(feature.properties.street_add); and that would pop up a standard alert box when you clicked on the feature.
Thank you @bmcbride. I found the solutions one hour ago reading Layer.js. I think it could be documented. I make it works with
clickEvent: function(feature, event){}
on a lvector object.
Usage:
Closes #11?