How to display the list of labels on the map?

There is a map with labels. In the labels the name of the balun and description. Want to next to the map was a list of these labels by names. And that at a clique on a label from the list opens the balun itself label on the map. How it can be implemented?

Here is the code:
<script type="text/javascript">
function init() {
 var myMap = new ymaps.Map('map', {
 center: [55.734046, 37.588628],
 zoom: 9,
 controls: ['zoomControl', 'typeSelector', 'fullscreenControl']
});

 var objects = ymaps.geoQuery()

<?php 

 while (($result = mysql_fetch_array($address))) 

 { 

 print_r (".add(ymaps.geocode('$result[0]',{results:1}))\n"); 

 } 

?>

.addToMap(myMap);

 var balloons = [<?php $myrow = mysql_query("SELECT cartime FROM data WHERE fio='$fio' AND carmodel='$carmodel' AND cardate='$cardate'"); while (($myrowresult = mysql_fetch_array($myrow))) { print_r ("'$myrowresult[0]', "); } ?>], i = 0;
 var balloonsfooter = [<?php $myrow2 = mysql_query("SELECT address FROM data WHERE fio='$fio' AND carmodel='$carmodel' AND cardate='$cardate'"); while (($myrowresult2 = mysql_fetch_array($myrow2))) { print_r ("'$myrowresult2[0]', "); } ?>], i = 0;
 objects.then(function () {
objects.get(0).balloon.open();
 for(var i = 0, len = objects.getLength(); i < len; i++) {
 objects.get(i).properties.set('iconContent', i + 1, 'results', '1');
 objects.get(i).properties.set('balloonContentBody', balloons[i]);
 objects.get(i).properties.set('balloonContentFooter', balloonsfooter[i]);

}
});
}

ymaps.ready(init);
</script>

September 26th 19 at 06:54
2 answers
September 26th 19 at 06:56
you need to use javascript

and to generate a PHP array to JavaScript with label settings
to get the type:
point_array = [{address:"Address1"}, {address:"Address2"}, etc.]

then use either the cluster if a lot of tags to add or cycle through the JavaScript
Dear Gasoid! Thanks for the reply, however I'm not strong in Java and php ), could you add, if you please? That's no php script is laid out here jsfiddle.net/smartmax/6nYEx/1 Actually there's a solution found, but to apply it not work ( ymapsapi.ya.ru/replies.xml?item_no=926 - arianna_Gorczany36 commented on September 26th 19 at 06:59
to help it's hard not knowing where do you get addresses etc. - Murray.Terr commented on September 26th 19 at 07:02
from array MySQL: $address = mysql_query ("SELECT address FROM data WHERE fio='$fio' AND carmodel='$carmodel' AND carnumber='$carnumber' AND cardate='$cardate'"); - arianna_Gorczany36 commented on September 26th 19 at 07:05
all variables are taken from $_POST ["] - arianna_Gorczany36 commented on September 26th 19 at 07:08
throw off this query in relansin, for 500 RUB. I will do - Murray.Terr commented on September 26th 19 at 07:11
ok ;) - arianna_Gorczany36 commented on September 26th 19 at 07:14
September 26th 19 at 06:58
Here is Your answer

Find more questions by tags JavaScriptMySQLPHPYandex.Maps