another issue about Phoca Maps Comp./Plugin

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
Dirk67
Phoca Member
Phoca Member
Posts: 39
Joined: 13 May 2009, 14:53

another issue about Phoca Maps Comp./Plugin

Post by Dirk67 »

Hi again,

here I found another point regarding the popups of the markers within the googlemaps-modal-window:
In FF3-Browser it looks fine -> in IE7-Browser the width of the Popup is somehow 3 times the normal width -> see attached pics.
Is it possible to overcome this strange browser-dependant behaviour somehow ?
(I think it is handled within the function: "markerPhocaMarker3.openInfoWindowHtml( )" ?)
(the popups of the marker looking fine within a normal google maps environment -> http://www.maps.google.com)
OK_marker_popup_FF3_1.png
wrong_marker_popup_IE7_1.png

...


.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: another issue about Phoca Maps Comp./Plugin

Post by Jan »

Hi,if you have problems with the width, just add some style into your editor. E.g. switch to "HTML Code View" in your editor and add at the begin this html tag:

Code: Select all

<div style="width:50px">
and in the end

Code: Select all

</div>
If you find Phoca extensions useful, please support the project
Dirk67
Phoca Member
Phoca Member
Posts: 39
Joined: 13 May 2009, 14:53

Re: another issue about Phoca Maps Comp./Plugin

Post by Dirk67 »

THX,
this works
...but if I enable displaying of the GPS-Data,
the problem is back again :idea: (IE7 only)

can you tell me the location of the code where the GPS data is inserted into the "marker-popup",
I think another <div> there would overcome the problem (?)
Dirk67
Phoca Member
Phoca Member
Posts: 39
Joined: 13 May 2009, 14:53

Re: another issue about Phoca Maps Comp./Plugin

Post by Dirk67 »

I found it in .../plugins/content/phocamaps.php

I think there is missing a closing </div> as well ?
around line 397

Code: Select all

if ($markerV->displaygps == 1) {
$text .= '<div><hr /><table border="0"><tr><td><strong>'. JText::_('GPS') . ': </strong></td>'
.'<td>'.PhocaMapsHelper::strTrimAll(addslashes($markerV->gpslatitude)).'</td></tr>'
.'<tr><td></td>'
.'<td>'.PhocaMapsHelper::strTrimAll(addslashes($markerV->gpslongitude)).'</td></tr></table>';
}
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: another issue about Phoca Maps Comp./Plugin

Post by Jan »

Hi, yes, you are right, it is a bug. I have fixed it in the same version (1.0.1) (added the missing </div> tag).

Thank you for this information.

Jan
If you find Phoca extensions useful, please support the project
Dirk67
Phoca Member
Phoca Member
Posts: 39
Joined: 13 May 2009, 14:53

Re: another issue about Phoca Maps Comp./Plugin

Post by Dirk67 »

same "bug" is in:
../administrator/components/com_phocamaps/front/views/map/tmpl/default.php
around line 282 and following


and to come back to my IE7 issue:
insert <div style="width:50px"> in this GPS Part as well ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: another issue about Phoca Maps Comp./Plugin

Post by Jan »

I have fixed id in components too.
and to come back to my IE7 issue:
insert <div style="width:50px"> in this GPS Part as well ?
Do you have still problems (in case you have set fixed width for description). If yes, then I will add some new parameter there (fixed width).

For now you can change the code e.g. to:

Code: Select all

$text =  '<div style="width:250px"><h1>' . addslashes($markerV->title) . '</h1>';
					$text .= '<div>'. PhocaMapsHelper::strTrimAll(addslashes($markerV->description)).'</div>';
					if ($markerV->displaygps == 1) {
						$text .= '<div><hr /><table border="0"><tr><td><strong>'. JText::_('GPS') . ': </strong></td>'
								.'<td>'.PhocaMapsHelper::strTrimAll(addslashes($markerV->gpslatitude)).'</td></tr>'
								.'<tr><td></td>'
								.'<td>'.PhocaMapsHelper::strTrimAll(addslashes($markerV->gpslongitude)).'</td></tr></table></div>';
					}
					$text .= '</div>';
Jan
If you find Phoca extensions useful, please support the project
Dirk67
Phoca Member
Phoca Member
Posts: 39
Joined: 13 May 2009, 14:53

Re: another issue about Phoca Maps Comp./Plugin

Post by Dirk67 »

Do you have still problems (in case you have set fixed width for description).
Yes,
but finally I found out that the problems with IE7 came from the <hr /> tag,
which is used when swithing on the GPS Display...

I limited it to a certain width <hr style="width:180px"/> and it looks fine then.

I changed it in 3 files:
../plugins/content/phocamaps.php
../components/com_phocamaps/views/map/tmpl/default.php
../administrator/components/com_phocamaps/front/views/map/tmpl/default.php

and everything worked well then...

(You can simulate the IE7 mode by switching the IE8 to "Compatibility View" mode)
willson
Phoca Member
Phoca Member
Posts: 36
Joined: 16 Mar 2009, 12:26

Re: another issue about Phoca Maps Comp./Plugin

Post by willson »

In view of the above, and becasue I encountered the same symptom, I modified /plugins/content/phocamaps.php to add a class="pmgpsr" to the <hr />

Code: Select all

if ($markerV->displaygps == 1) {
				$text .= '<div><hr class="pmgpshr"/><table border="0"><tr><td><strong>'. JText::_('GPS') . ': </strong></td>'
						.'<td>'.PhocaMapsHelper::strTrimAll(addslashes($markerV->gpslatitude)).'</td></tr>'
						.'<tr><td></td>'
						.'<td>'.PhocaMapsHelper::strTrimAll(addslashes($markerV->gpslongitude)).'</td></tr></table></div>';
			}
and to my custom.css

Code: Select all

hr.pmgpshr {
width: 20%;
}
This minimizes the symptom with IE7 - - which is obviously treating the width of the hr as the width of some previous division/block instead of the width of the current division.

I might look into eliminating the <hr /> and use the top border of the GPS div instead; it's more likely to be cross-browser friendly. That is: I'd add a class="pmgpsdiv" to the div that already precedes the hr and use that to give the div a visible top border and some amount of padding.
-----
Using: Restaurant Menu Pro, Gallery, Maps, Guestbook, PDF
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: another issue about Phoca Maps Comp./Plugin

Post by Jan »

Hi, fixed in Phoca Maps component 1.0.3, Phoca Maps plugin 1.0.3

I removed the <hr /> tag and added a class name to div, seems like it is working in IE7 (IE8 compatability view)

https://www.phoca.cz/demo/phoca-maps-demo-plugin

Jan
If you find Phoca extensions useful, please support the project
Post Reply