Answer the question
In order to leave comments, you need to log in
How to include a separate json file?
Hello.
I'm dealing with the Yandex map, I want to make sure that all the tags are in a separate json file, how can I connect it here
window.myObjects = ymaps.geoQuery({
type: "FeatureCollection",
features: вот сюда
}).addToMap(myMap);
Answer the question
In order to leave comments, you need to log in
Perhaps someone will come in handy.
Solved the problem, redid the logic a bit
$.getJSON('map.json', function (json) {
window.myObjects = ymaps.geoQuery(json).addToMap(myMap)
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question