Title on markers

Phoca Maps - displaying maps in Joomla! CMS
rrmdp
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 04 Jan 2010, 14:48

Title on markers

Post by rrmdp »

Hello, its any way to take off the title of the markers?? Or make them smallers??? Thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Title on markers

Post 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
If you find Phoca extensions useful, please support the project
rrmdp
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 04 Jan 2010, 14:48

Re: Title on markers

Post by rrmdp »

The &nbsp 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
ri2ir
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 20 Dec 2009, 18:52

Re: Title on markers

Post 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
wpattie
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 17 Aug 2010, 08:07

Re: Title on markers

Post 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 "="
Post Reply