Didn't try myself but first thing that pops into my eye is incorrect syntax of html element attributes.
- Code: Select all
<div style='width:722px;margin:0px;padding:0px;border:2px solid #6db466;font-family:Arial,Helvetica,sans-serif;'>
<iframe width=720 height=680 border=0
All single quotes above should be double quotes, and the values of the width, height etc. attributes of the iframe tag should be wrapped in double quotes too
I admit that I'm lazy in that I often leave the quotes altogether. I find that it makes the HTML more readable. If the attribute value is a simple word or number, I've never had any problems with it, even though it's officially not correct. However, single quotes instead of double ones are legal (I just rechecked it on w3schools to be sure), and, more importantly, all three browsers accept it. Usually, I use single quotes when there is a double quote in an attribute value. In this case, it's just a coincidence: I had tried double quotes first, then single, and when posting in the forum, it happened to be still single quotes. Nevertheless, to exclude that I'm missing something, I've changed all the single quotes back to double ones again. No change in results.
phlipdascrip wrote:2) If I open the URL of the iframe's src attribute directly it says the page does not exist.
Good point. I just tried that and had the same. I saw the problem right away: it's the ?
character right after http://maps.google.com/maps
. That's a fancy way to specify a ?
character, but if you use that directly, it doesn't work. When I first embedded my map, I did use ?
, but in one of my attempts to get it working I thought that perhaps some script on SummitPost was processing the ?
itself instead of just passing it along. It didn't make any difference. I've changed it back to a ?
now, to avoid confusion.
For the sake of completeness, here is how the code looks now:
- Code: Select all
<div style="width:722px;margin:0px;padding:0px;border:2px solid #6db466;font-family:Arial,Helvetica,sans-serif;">
<iframe width="720" height="680" border="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=-43.72104,170.06445&aq=&sll=-43.746297,170.066986&sspn=0.524813,0.85968&ie=UTF8&t=p&ll=-43.723909,170.076513&spn=0.042179,0.061712&z=14&output=embed">
As you can see, I've left the &
characters, which are basically &
, because I've had bad experiences previously when putting in & directly. I forgot in which browser that was, but I learned that &
works everywhere and &
doesn't. If you use the url directly, at least Google Maps is opened, but to get the correct parameters, you would have to replace all &
phlipdascrip wrote:3) I've too embedded google maps into SP pages and noticed that when I edit a page and click save, google maps don't show right away. I have to reload the page in order for the map to show up.
Yeah, that's the same when using Google Chrome, and it took me a while to figure that out at first. For IE that doesn't make a difference. However, I just had a hunch and discovered that when the map doesn't show in IE, you can right-click on the map area itself
and force it to Refresh - and then
I don't understand why. It makes me think that there might be some caching thing going on, but even if that's the case, then why doesn't the old version of the map get displayed when I simply (re)load the whole page?
If only I could force a refresh of the contents of the iframe somehow ...