Adding Address and CSS classes to Marker List

New home Forums Pro Add-on Adding Address and CSS classes to Marker List

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7920
    jwrightspplus
    Member

    Seems that the address field is missing from the Marker List Table in the Pro Version. Also it would be nice to have the elements in the Marker Table at least CSS classed so that they can be more easily styled.

    For instance I made the following update to wp-google-maps-pro.php:

    At about line #1596 – the current code is:

    $wpgmza_marker_list_output .= "
    	<tr id=\"wpgmza_marker_".$result->id."\" mid=\"".$result->id."\" mapid=\"".$result->map_id."\" class=\"wpgmaps_mlist_row $oddeven\">
    		<td height=\"40\" class=\"wpgmaps_mlist_marker\">".$icon."</td>
    		<td class=\"wpgmaps_mlist_pic\" style=\"width:".($wpgmza_image_width+20)."px;\">$pic</td>
    		<td  valign=\"top\" align=\"left\" class=\"wpgmaps_mlist_info\">
    			<strong><a href=\"javascript:openInfoWindow($wpgmaps_id);\" id=\"wpgmaps_marker_$wpgmaps_id\" title=\"".$result->title."\">".$result->title."</a></strong>
    			$wpgmaps_desc_text
    			$wpgmaps_dir_text
    		</td>
    
    	</tr>";

    To include the address and some CSS classes change that to:

    $wpgmza_marker_list_output .= "
    	<tr id=\"wpgmza_marker_".$result->id."\" mid=\"".$result->id."\" mapid=\"".$result->map_id."\" class=\"wpgmaps_mlist_row $oddeven\">
    		<td height=\"40\" class=\"wpgmaps_mlist_marker\">".$icon."</td>
    		<td class=\"wpgmaps_mlist_pic\" style=\"width:".($wpgmza_image_width+20)."px;\">$pic</td>
    		<td  valign=\"top\" align=\"left\" class=\"wpgmaps_mlist_info\">
    			<div class=\"wpgmaps_mlist_info_title\"><strong><a href=\"javascript:openInfoWindow($wpgmaps_id);\" id=\"wpgmaps_marker_$wpgmaps_id\" title=\"".$result->title."\">".$result->title."</a></strong></div>
    			<div class=\"wpgmaps_mlist_info_address\">$wpgmaps_address</div>
    			<div class=\"wpgmaps_mlist_info_description\">$wpgmaps_desc_text</div>
    			<div class=\"wpgmaps_mlist_info_get_directions\">$wpgmaps_dir_text</div>
    		</td>
    
    	</tr>";

    You will also need to get rid of the <br/> tags from the $wpgmaps_desc_text and the $wpgmaps_dir_text strings.

    Hope this helps.

    Thanks!

    Love the plug-in BTW. Great work.

    John

    #7960
    Nick Duncan
    Keymaster

    Thanks John 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Adding Address and CSS classes to Marker List’ is closed to new replies.