D
D
denis-chenykh2020-12-18 12:58:30
JavaScript
denis-chenykh, 2020-12-18 12:58:30

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

1 answer(s)
D
denis-chenykh, 2020-12-18
@denis-chenykh

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 question

Ask a Question

731 491 924 answers to any question