Page 1 of 1
Title on markers
Posted: 04 Jan 2010, 15:07
by rrmdp
Hello, its any way to take off the title of the markers?? Or make them smallers??? Thanks
Re: Title on markers
Posted: 05 Jan 2010, 19:34
by Jan
Hi, this can be customized in the code, there is no option for this

but you can e.g. paste as title empty char like which will cause not displaying the title in the marker.
Jan
Re: Title on markers
Posted: 06 Jan 2010, 00:48
by rrmdp
The   worked out but it leaves a big gap and it doesnt look nice. If you can tell me wich part of the code should I remove to take the title off would be great. Thanks a lot for your help
Re: Title on markers
Posted: 22 Apr 2010, 21:16
by ri2ir
Hi to reduce the size of the title of the marker, simply edit the file
/components/com_phocamaps/views/map/tmpl/default.php
the line 127 is
Code: Select all
$text = '<h1>' . addslashes($markerV->title) . '</h1>';
and change the H1 tag, for example to
Code: Select all
$text = '<h4>' . addslashes($markerV->title) . '</h4>';
Save the file, reload the page and your title is now smaller...
p.s. Thank's phoca for this other great extension
http://www.divemauro.it
Re: Title on markers
Posted: 20 Aug 2010, 14:51
by wpattie
daajestaa wrote:To edit the style of the Marker Title, simply create a custom H1 class and add it to the PHP file;
1. Locate the file plugins/content/phocamaps.php
2. Around line 367, locate the code
$text = '<h1>' . addslashes($markerV->title) . '</h1>';
3. Edit the h1 tag to add a custom class e.g. <h1 class="MarkerTitle">
4. Locate the CSS file at components/com_phocamaps/assets/phocamaps.css
5. Add the custom h1 class you created to this file
You will now be able to style the Marker title as you like - including the height/size etc. If you want to remove this completely, simply comment out this line.
I found this thread very helpful and would like to make this small contribution.
My preference is to be able to style the title of the marker, as well as the rest of the marker details, using the marker description box. This makes it easy to have different styling, e.g. colours, for different markers on the same map.
I do this by commenting out the code line that sets the title style in the phocamaps.php file, as daajestaa suggested in the last sentence. With that done, I only need to include in-line styling of the title in the marker description box when I want to change styles. This avoids having to make further changes to the PHP code and CSS style sheets.
However, when you comment out the PHP code line that sets the marker title style in the phocamaps.php file, you must also make a change to the code line that follows it. These two lines are:
Code: Select all
$text = '<h1>' . addslashes($markerV->title) . '</h1>';
$text .= '<div>'. PhocaMapsHelper::strTrimAll(addslashes($markerV->description)).'</div>';
these need to be changed to:
Code: Select all
/* $text = '<h1>' . addslashes($markerV->title) . '</h1>'; */
$text = '<div>'. PhocaMapsHelper::strTrimAll(addslashes($markerV->description)).'</div>';
The first line is commented out while in the second line the operator ".=" is changed to "="