-
Notifications
You must be signed in to change notification settings - Fork 119
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
ReferenceError: Can't find variable: LatLong<number> when I try to create new LatLong #180
Comments
Hi @AdrianStaskiewicz , My guess is you're not converting to an proper LatLong in the mouse event. Without seeing code I can't be sure. It needs to be done like this:
etc. Hope that helps, if not, post some code, the mouse event at least. Cheers, |
Hi @GeoffCapper
And of course variable The issue occurs at this line: What I have to change on my code? |
Sorry, I'd forgotten about the addMouseEventHandler method. In that case I suspect there is a problem with the delegates converting the original javascript event over to the java event. Try using the addUIEventHandler method instead of the addMouseEventHandler, and see if that makes a difference. The top of your code would look like:
|
@GeoffCapper
I supose that the problem is at line: It is in |
@GeoffCapper Best Regards, |
Hello,
I'm trying to use a method
addMapShape()
, but when I'm adding a new point to my array (on mouse click event) and runMVCArray pmvc = new MVCArray(points.toArray());
I get:ReferenceError: Can't find variable: LatLong This issue shows only when I'm catching new point on this mouse event. When I'm predefining some points on method
initializeMap()
and create new MVCArray with this points everything is OK, all methods work correctly and the new polygon shows.Additionally the number new LatLong object get a random number. Often starts from 13 or something like this, and increase by random value, fro example 13, 15, 17, 22, 27....
And then the error occurs with the number of first element of array. F.E.
ReferenceError: Can't find variable: LatLong13
The text was updated successfully, but these errors were encountered: