Map Not Showing Up - Using Basic Script

22 views
Skip to first unread message

samantha

unread,
Nov 18, 2010, 12:53:24 PM11/18/10
to google-map...@googlegroups.com
Hey...I'm not the greatest at this stuff, however, I managed to make the old API work. 

I copied over the API script from the tutorial and adjusted to work for my site. I have gone through and double-checked each facet and I think everything is as it should be, but map still not showing up. 

Would someone be willing to be a second pair of eyes and let me know what I am missing here?


(What I would eventually like it to look like once I learn the scripting is on my current location.htm page using the old API:

Script is included below:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/map-template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="metadata" -->
<title>430 Plantation Club, Sea Pines - Property Location</title>

<meta name="Description" content="Sea Pines Real Estate Source. Nancy Love, Sea Pines Hilton Head Home Specialist is proud to present 430 Plantation Club - Sea Pines." />

<meta name="keywords" content="sea pines, sea pines hilton head, sea pines resort, sea pines villas, sea pines plantation, seapines, seapines realty, hilton head, hilton head island, hilton head real estate, sea pines resort hilton head, hilton head sea pines, hilton head realtor, hilton head villas, hilton head properties, hiltonhead" />
<!-- InstanceEndEditable -->

<link href="../scripts/property-styleguide.css" rel="stylesheet" type="text/css" />
<!-- InstanceBeginEditable name="scripts" -->

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript"
</script>
<script type="text/javascript">
  function initialize() {
    var latlng = new google.maps.LatLng(32.129435, -80.792836);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map"),
        myOptions);
  }

</script>

<!-- InstanceEndEditable -->

</head>

<body onload="initialize()"> 


<div id="container">
  <div id="header">
    <div id="banner">
      <!--end banner-->
    <a href="../index.htm"><img src="../images/430_plantation-club-property-banner.gif" width="900" height="101" alt="12 Calibogue Cay, Sea Pines, Hilton Head Island" /></a></div>


<div id="beachScene"><!-- InstanceBeginEditable name="panorama" -->
  <img src="../images/Love-Beach-Scene.jpg" width="900" height="102" alt="Sea Pines Beach Scene" />
  <!-- InstanceEndEditable -->
  <!--end beachScene-->
</div>
  
<div id="mainNav">
<div id="box"></div>
<!--end mainNav-->
</div>

<!--end header--> </div>

<div id="content">


<div id="links">
    <p>brochure</p>
    <p><a href="flash_gallery/gallery.htm">gallery</a></p>
    <p><a href="details.htm">details</a></p>
    <p><a href="financials.htm">financial</a></p>
    <p>documents</p>
    <p><a href="location.htm">location</a></p>
    <p><a href="http://sp-amenities.com/home.asp" target="_blank">amenities</a></p>
    <p><a href="hilton_head.htm">hilton head</a></p>
</div>
  <div id="listing">
   <!-- InstanceBeginEditable name="mainContent" --> 

     <div id="map" style="width:100%; height:100%"></div>

    
    <!-- InstanceEndEditable -->
  </div>
  
<p> <br class="clearfloat" />
</p>

<!--end content--></div>

<div id="footer">  



<pre>Design by <a href="http://www.chameleoninteractive.net" target="_blank">CHAMELEON INTERACTIVE, LLC                    </a>&copy;2009 <a href="http://www.chameleoninteractive.net" target="_blank">CHAMELEON INTERACTIVE, LLC</a>. All rights reserved. | <a href="../terms.htm">Terms</a> | <a href="../sitemap.htm">Sitemap</a>                    Photos by <a href="http://www.kaufmanphotography.com" target="_blank">KAUFMAN PHOTOGRAPHY</a></pre>

<!--end footer--></div>  

<!--end container--></div>

</body>
<!-- InstanceEnd --></html>
---------------------------------------------------------------------------------------------------------------------------

Thank you!!

Samantha

geoco...@gmail.com

unread,
Nov 18, 2010, 1:03:48 PM11/18/10
to Google Maps JavaScript API v3
On Nov 18, 9:53 am, samantha <saman...@chameleoninteractive.net>
wrote:
> Hey...I'm not the greatest at this stuff, however, I managed to make
> the old API work.
>
> I copied over the API script from the tutorial and adjusted to work for
> my site. I have gone through and double-checked each facet and I think
> everything is as it should be, but map still not showing up.
>
> Would someone be willing to be a second pair of eyes and let me know
> what I am missing here?
>
> http://430plantationclub.com/details/location2.htm
>
> (What I would eventually like it to look like once I learn the
> scripting is on my current location.htm page using the old API:
> Old Location Page
>

> <div id="map" style="width:100%; height:100%"></div>

100% of what? Looks to me like you have a zero-size div problem. If
I hard code the size on a local copy it appears.

-- Larry

> ---------------------------------------------------------------------------­------------------------------------------------
>
> Thank you!!
>
> Samantha

samantha

unread,
Nov 18, 2010, 1:52:11 PM11/18/10
to google-map...@googlegroups.com
Hey Larry,

I'm not sure to what you are referring. The 100% reflects back on the size of the "map" div. I took this code straight from the "tutorial" example given by Google Maps. I have a "map" div. In my CSS, as I have already defined the parent dimensions. The tutorial says to let the "map" div take on the dimensions of the parent block. Which is what I did.

<div id="map" style="width:100%; height:100%"></div>


How else should this look?

Samantha

geoco...@gmail.com

unread,
Nov 18, 2010, 1:58:51 PM11/18/10
to Google Maps JavaScript API v3
On Nov 18, 10:52 am, samantha <saman...@chameleoninteractive.net>
wrote:
> Hey Larry,
>
> I'm not sure to what you are referring. The 100% reflects back on the
> size of the "map" div. I took this code straight from the "tutorial"
> example given by Google Maps. I have a "map" div. In my CSS, as I have
> already defined the parent dimensions. The tutorial says to let
> the "map" div take on the dimensions of the parent block. Which is what
> I did.

That is fine. But somewhere in the css chain on your page, something
is different.
Look at the css included on the example you started with.

(I suspect this is a css problem, not a maps problem)

Or try hardcoding the size (using pixels not percent), verify it fixes
the problem for you, then address the missing css (if it works).

-- Larry

Ava

unread,
Nov 18, 2010, 3:20:37 PM11/18/10
to google-map...@googlegroups.com
I had the same problem until I hard coded a div size in the stylesheet.

samantha

unread,
Nov 18, 2010, 3:48:04 PM11/18/10
to google-map...@googlegroups.com
Thanks guys...hard coding did it! I'll have to get it uploaded later...but at least it is working via Dreamweaver.

Many, many thanks!!!!

Samantha
Reply all
Reply to author
Forward
0 new messages