-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed "Property style on undefined" #23
Conversation
Only style of the code was changed. Indentation, etc. But no fix in sight |
Go to line no. 645, 668 and 691. I wrap code with If conditions |
I found. For which use-case do you introduce those modifications ? If you wrap those code lines into condition and icon object does not exist, bouncing doesn-t work at all, and this made the use of this pugin pointless |
Unfortunately, the problem still exists. There ate no if statements in the master. |
@tomek-servlets |
In my opinion before line 645 after adding of these statements there are no more errors in the console |
@tomek-servlets is it bug or just console warning ? |
If I remove the if before line 645 I get hundreds of errors: |
@tomek-servlets |
On your page there I can see no errors. I created a small page with errors. Click on the map and see the console: |
@ironbone Thanks for concrete example! Your problem is easy to solve. You made a mistake by calling method marker = L.marker(latlng, {icon: personIcon})
.bindPopup(popupText).bounce() // <- wrong place to call bounce
.setBouncingOptions({
bounceSpeed: bounceSpeed,
}).addTo(map); To fix, just call marker = L.marker(latlng, {icon: personIcon})
.bindPopup(popupText)
.setBouncingOptions({
bounceSpeed: bounceSpeed,
}).addTo(map).bounce(); // <- bounce called in the end |
Thank you for your answer. |
@ironbone I updated readme to outline importance to add market to map before call |
Found issue before set icon style, so I just wrap those with If condition and it is working fine now.