Larry, I moved the DOCTYPE declaration to the top, thanks. I was not the
original creator of this website and I noticed that the DOCTYPE declaration
is not on any of our pages! Do I need to add this to the template we
created?
I also noticed that after doing so it messed up the menus on the left side
of this page. Also, the map seemed to work before I added this part:
setMarkers(map, sites);
}
var sites = [
['Alamo Ranch', 29.477054,-98.7356355, 7,<h3 align='left'>Alamo
Ranch</h3><div align='left'><p>4522 Albert Martin<br />City of San
Antonio<br />San Antonio, Texas 78251<br />],
['Pinaccle Point Apartments', 28.9324595,-97.0283383, 7,<h3
align='left'>Pinnacle Point Apartments</h3><div align='left'><p>702 Salem<br
/>Pinnacle Point Apartments<br />Victoria, Texas 77904<br />],
];
function setMarkers(map, markers) {
for (var i = 0; i < markers.length; i++) {
var sites = markers[i];
var siteLatLng = new google.maps.LatLng(sites[1], sites[2]);
var marker = new google.maps.Marker({
position: siteLatLng,
map: map,
title: sites[0],
zIndex: sites[3],
html: sites[4]
});
var contentString = "Some content";
var infowindow = new google.maps.InfoWindow({
content: contentString
});
google.maps.event.addListener(marker, "click", function () {
alert(this.html);
infowindow.setContent(this.html);
infowindow.open(map, this);
});
}
}
</script>
Before I added this i just had this code in its place:
pins[0] = new google.maps.LatLng(29.477054,-98.7356355);
markers[0] = new google.maps.Marker({ position: pins[0], map: map,
title: 'Alamo Ranch' });
}
for three different locations and it seemed to work great. Those were the
only lines I changed.
Yesterday with your help I made my page work with the map in all the
browsers and on ipad/phones.
I felt like a king yesterday... Today, not so much.
I am learning html code and working on our website at the same time so
please excuse my poor code skills. I am using expression web4 and am
enjoying its interface much more than our old frontpage2000. I am certain
that I can improve our website given some time, but right now this map is
important to my boss and myself so any help you provide is so very helpful.
Thank you, and thanks to everyone here who is helping out bozos like me.
On Wed, Jan 5, 2011 at 12:57 PM, [email protected]
<[email protected]>wrote:
> On Jan 5, 10:04 am, BMC <[email protected]> wrote:
> > Can anybody help me with my code or let me know if I've gone in the
> > complete wrong direction with it?
> > Thanks
> >
> > http://www.miracleparkplace.com/index/pinMAPgallery.htm
>
> When creating a google maps API page make sure your html is valid.
> You have multiple <html>, body and head tags, your DOCTYPE declaration
> is not the first thing in the file. Make sure you only have one of
> each (I think that is why you aren't getting a map, at least I don't
> see one in IE).
>
> -- Larry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.