-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Change img.src and map on the fly -> Error Unable to set property 'coords' #66
Comments
Can you try the version in this PR and let me know if it works for you? |
@davidjbradshaw I also have a pretty identical use case to this I have tried the linked PR however it still comes up Cannot set property 'coords' of undefined |
I fixed this issue for myself the two changes that I believe are needed are
Which just negates the beenHere check and
Which stopped the error about Coords not being set, It seem to call it too early (resulting in the error) and then call again which worked |
@nzlrhyz: Thanks for the solution! We had given up in 2018 and today I was able to realise our requirement with your trick. @davidjbradshaw |
Happy to accept a PR |
THANK YOU VERY MUCH!! I had the same issue about changing the source image + changing its map dynamically. It is now working ! |
Error: Unable to set property 'coords' of undefined or null reference
Everything works the way we want it first time, excellent, thank you for the tool!
Our users can change the src of the image. After that we delete all area from the map and put new area in the map.
There are problems here. The tool saves the old areas between and wants to adjust them after the src change. But at this time the map has no area.
Error: Unable to set property 'coords' of undefined or null reference
Line 20: areas[idx].coords = cachedAreaCoords.split(',').map(scale).join(',');
Reason: areas[idx] is undefined.
How can we change the src and build the new map without having this error?
The tool was initialized by $ ('#mainpicture map').ImageMapResize();
How can we de-initialize / destroy / delete / remove it? To reinitialize it after setting all the HTML details?
The text was updated successfully, but these errors were encountered: