Page 1 of 2

another issue about Phoca Maps Comp./Plugin

Posted: 10 Jun 2009, 15:47
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

...


.

Re: another issue about Phoca Maps Comp./Plugin

Posted: 10 Jun 2009, 23:49
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>

Re: another issue about Phoca Maps Comp./Plugin

Posted: 11 Jun 2009, 08:11
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 (?)

Re: another issue about Phoca Maps Comp./Plugin

Posted: 13 Jun 2009, 21:30
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>';
}

Re: another issue about Phoca Maps Comp./Plugin

Posted: 13 Jun 2009, 22:51
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

Re: another issue about Phoca Maps Comp./Plugin

Posted: 13 Jun 2009, 23:01
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 ?

Re: another issue about Phoca Maps Comp./Plugin

Posted: 13 Jun 2009, 23:23
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

Re: another issue about Phoca Maps Comp./Plugin

Posted: 14 Jun 2009, 18:25
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)

Re: another issue about Phoca Maps Comp./Plugin

Posted: 15 Jun 2009, 13:03
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.

Re: another issue about Phoca Maps Comp./Plugin

Posted: 18 Jun 2009, 16:06
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