PHP Classes

Search By Title

Recommend this page to a friend!

      Map Builder  >  All threads  >  Search By Title  >  (Un) Subscribe thread alerts  
Subject:Search By Title
Summary:Search By Title
Messages:2
Author:Eric Ng
Date:2015-04-05 09:22:24
 

  1. Search By Title   Reply   Report abuse  
Picture of Eric Ng Eric Ng - 2015-04-05 09:22:24
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.

Hope to get some guidance

  2. Re: Search By Title   Reply   Report abuse  
Picture of Vagharshak Tozalakyan 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();
.....