|
Written by Mike Reumer
|
|
Tuesday, 12 June 2007 23:48 |
|
You can place the {mosmap} inside the content of article. Doesn't need to be in the html of the content.
Check the following parts:
- For Joomla 1.5, check at the parameters of the plugin if the parameter published (on right side) is Yes.
This parameter is default 'No'. The parameter is necessary so we can remove the {mosmap} code if you want the plugin to be unpublished.
- The preview in the backend won't show the map, because the plugin isn't called. You will see the code {mosmap} in the preview.
- No <br /> inside the {} of the {mosmap}
- No line break/return inside the {}
- Place it at the start of a line
- In the text parameter don't use (double) quotes in html-tags.
- The plugin doesn't work correctly with the WYSIWYG editor JCE, because JCE doesn't place the code in one line and translates quotes and other special characters.
For JCE have a look into your setup-Section under Joomla-Admin-Backend Components]-[JCE-Admin]-[JCE-Configuration] in Section [Entity Encoding]. There are the possible options [Numeric], [Named], [RAW]. Try the option and see what's working bet for the plugin. But pay Attention: If you work with other Authors or Publisher, you maybe in trouble with some of Features, or Plugins by JCE.
- If you want to show a map in a module of component (like contacts) then you need to hack Joomla (see Joomla 1.0.x and Joomla 1.5.x ).
- Place in your template all <meta> entities directly behind the <head> together.
- Also check the css-file of your template and if it exists remove the following:
div { overflow:hidden; }
or try and add overflow:hidden
- I've you get a message the the google api key isn't valid. You can check the url of the website by entering: "javascript:alert('http://'+window.location.host)" in the addressfield of your browser.
- If you have special characters in your IDN-domain then the key for google maps will not work allright. See Issue 12 of GMaps API.
For example: www.østerhøj.dk won't work.
- For IE6: When you get a fatal error, check to see if the {mosmap} isn't between <p> tags. Remove the <p> tags around the {mosmap}.
- For IE6: Since XP SP3 there are changes in IE6 that can give a fatal error when loading a map. This may be solved by closing the <base> explicitly in your template with </base>. No self closed tag (base ... />!
See: Forum of Google Maps API . Other solution is to set the Google Maps API version in the configuration of the plugin to 2.118.
- For IE6: Check the template for a script that makes png's transparant. This can conflict with google maps (not with plugin)! Remove it or search for a script compatable with google maps or use a div as described below. The code could look like:
<style type="text/css"> #fxTab {background: none; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='templates/<?php echo $mainframe->getTemplate(); ?>/images/<?php echo $tstyle; ?>/fx-tab.png', sizingMethod='scale', enabled='true');} img { behavior: url('/<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate('); ?>/css/iepngfix.htc); } </style>
This is mostly plaved between:
<!--[if lte IE 6]>
... <![endif]-->
- Another solution to prevend that the pngfix effects the map is to place the map between a div with the following styling:
div#map img { behavior: none; }
- CorrectPNG mambot breaks it in IE (just a grey box with marker on it) but UltimatePNGFix mambot seems to work with Google Maps.
- If a infowindow doesn't capture all content with an image: you need to set the width and height of the image inside the html code instead of nothing. The first time the browser doesn't know the size of the image and will load a standard infowindow. Second time the image is in the cache and the browser knows the size of the image and the infowindow is allright.
- Version 2.11 has a different zoom. It's the other way around so if you have to convert it do zoom=19-oldzoom.
The zoom is now the same mechanism as Google Map API.
- There can be a conflict between javascript frameworks like prototype, Mootools and jQuery. Mootools is default delivered by Joomla 1.5.
To solve conflicts with jQuery add this to your template below jQuery.js (see: http://blog.phil-taylor.com/): jQuery.noConflict();
// Use jQuery via jQuery(...) // Use Prototype/Mootools with $(...), etc.
Or have a look at this article .
- When other modules give javascript errors then the map may not show. You can try to set in the configuration of the plugin the parameter "Load with mootools?" to timeinterval. Then the map may show.
Of course best solution is to solve the javascript errors.
- If you place a link inside the infowindow then it will always open in a new window or tab!
You can use a kml-file and GeoXML to open a link in the same window (see kml sidebar).
- If you use Simple Image Gallery (SIG) then there can be conflict. The free SIG version loads its javascripts everytime without checking if the already exists and breaks the already loaded javascripts. With the SIG pro you can solve the problem by choosing mootools.
You can try to load SIG plugin before Google Maps Plugin so change the order in the plugin manager.
- If using the compressor plugin with your google map plugin, the admin should configure the compressor plugin to exclude javascript of the googlemaps plugin because they already are compressed. Currenlty the kml renderer's javascript file (ex: geoxml.js) will not work when compressed twice. The plugin's parameters provide a place where you can exclude a list of specific CSS and JS files. Just simply enter 'geoxml.js' into one of the excluded JS file fields, and it will work properly.
- There are extensions for browsers that checks the generated html page, the related images and the css/javascript file and filter out specific code so advertisements are not shows or other suspieus stuff. For example BFilter available on the Mac will give a remark that the google maps api scripts(<script src="http://maps.google.com/maps?file=api&v=2.x&oe=utf-8&hl=en&key=....&sensor=false&indexing=true" type="text/javascript"></script>) has too many unrelated nested scripts.
So the maps will not work.
You can use Firefox with Firebug to inspect the styling on the specific object on the page to see what styling interferes with the corners.
Or you must debug your template by:
- Save the source of your page (generated by joomla) as a html page
- Now you can edit it and open it in a browser.
- Maybe you need to add a <base href="/www.yourdomain.com" /> when design is not allright or javascript and image are not found.
- Step by step remove javascript to see if problem disappear.
- If you found the right javascript check if you really need it otherwise try to solve the problem.
- If not found the problem remove the one by one the link to css files.
- If you found the right css-file then you have to debug this and remove one by one the defined styles to see if the problem disappear.
|
|
Last Updated on Friday, 12 February 2010 21:04 |