M
M
Max2015-05-22 00:44:15
JavaScript
Max, 2015-05-22 00:44:15

Where is the error in Google map initialization?

Hello, tell me how to solve the problem.
There is a large JSON file, with several nested arrays. It was possible to extract the necessary data from it and run a loop to fill in several new google.maps.LatLng. Here is the entire function code jsfiddle.net/r04s32ph
JSON example:

{"stops" : [{"zoneId":"5522bdb1e4b047df5b5b7afa","coords"
:[],"name":"Ватутина","description":""}

At the position of new google.maps.LatLng, you need to insert the coordinates from the JSON file one by one.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Slashchinin, 2015-05-22
@slashinin

And why are you making another, the same request inside the getJSON handler, only by native means?

$.getJSON('zones.json', function(data){
// В data будут JSON данные
});

api.jquery.com/jQuery.getJSON

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question