Answer the question
In order to leave comments, you need to log in
How to properly form a collection of geo objects in ymap?
Task: to form a json array so that it creates collections of geo objects i.e.
var myCollection = new ymaps.GeoObjectCollection(collection, {preset: 'twirl#shopIcon'});
Answer the question
In order to leave comments, you need to log in
Found a solution using geoQuery
example:
var result = ymaps.geoQuery({
type: 'FeatureCollection',
features: [
{
type: 'Feature',
geometry: {
type: 'Circle',
coordinates: [15, 15],
radius: 100
}
},
{
type: 'Feature',
geometry: {
type: 'LineString',
coordinates:
}
},
{
type: 'FeatureCollection',
features: [
{
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [12, 41]
},
properties: {
name: 'point'
},
options: {
preset: 'islands#yellowIcon'
}
}
]
}
]
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question