Z
Z
z_u_l2018-12-27 16:02:52
JavaScript
z_u_l, 2018-12-27 16:02:52

Why doesn't city switching work?

I set the coordinates in the data-goto attribute. Further, depending on which link was clicked, the map should be centered relative to the given coordinates. Now, if you click on the link - it goes into a long download and that's it. What's my mistake?
Link to example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-12-27
@z_u_l

You're passing in a string as coordinates instead of an array.
Wrap in . this.getAttribute('data-goto')JSON.parse

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question