I am having a map of 50 markers using this class, with title labeled as PTG1, PTG2, PTG3,...,PTG50, This class is excellent as it managed to plot the markers that I want, is there a way for me to build a search function within a map with this 50 markers map, so that when I search for say PT32, it will point to the PT32 marker of this map.
Vagharshak Tozalakyan - 2015-12-19 14:08:24 - In reply to message 1 from Eric Ng
You can capture the markers and their properties in mbOnAfterInit() JS callback:
<script>
function mbOnAfterInit(map) {
for (i = 0; i < markers.length; i++) {
alert(markers[i].getTitle());
}
}
</script>
<?php
$map = new MapBuilder();
.....