Jump to content
Sign in to follow this  
Mitrovah

Google Map Marker and Centering Map

Recommended Posts

So I have code for a google map window. However I am having trouble figuring out how to make a generic google marker appear on my Long and Lat location.

The <div id> tag is at the bottom of the page and I want to figure out how to center it in the page.

 

My second question is how to indent the first line of the first paragraph.

this is my Google Map Code:

<script src="http://maps.googleapis.com/maps/api/js"></script>
    <script>
function initialize() {
  var mapProp = {
    center:new google.maps.LatLng(41.652589,-91.532774),
    zoom:18,
    mapTypeId:google.maps.MapTypeId.ROADMAP
  };
  var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
google.maps.event.addDomListener(window, 'load', initialize);
  var myLatlng = new google.maps.LatLng(41.652589,-91.532774);
  var marker = new google.maps.Marker({
position: myLatlng,
map: map,
});
</script>
 
 
<div id="googleMap" style="width:500px;height:380px;">
Edited by Mitrovah

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...