Home › Forums › MapPress Support › List Poi single map › Reply To: List Poi single map
August 27, 2014 at 4:08 am
#15109
How can I set the poiList to true in php???
I have a custom map
$mymap = new Mappress_Map(array("width" => 222, "height" =>290,"poiList" => "true"));
$args = 'cat=773&post_status=publish&posts_per_page=3&orderby=rand';
$query = new WP_Query( $args );
$i=0;
$mypoi_1=array();
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
$vars = explode(",",get_post_meta(get_the_ID(),"vol_work_loc",true));
if($vars[0]!=NULL){
$mypoi_1[$i] = new Mappress_Poi(array("title" => get_the_title(), "body" => the_excerpt_max_charlength(90)." <a href=\"". get_permalink()."\">Read More</a>", "point" => array("lat" => $vars[0], "lng" => $vars[1])));
$i++;
}
}
}
$mymap->pois = $mypoi_1;
echo $mymap->display(array("directions"=>"none", "zoom"));