Search the web
Sign In
New User? Sign Up
yws-maps-ajax · | Yahoo! Maps Ajax API
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Ymap demos not working with doctype   Message List  
Reply | Forward Message #127 of 259 |
Hi everyone,
I am fairly new to web programming and I was wondering if anyone could
explain why I have the following problem with the demo code for Ymaps.
The issue I am having is that I can't get the map's width to spread
across the screen if I use the following doc type (it just produces a
square map half the size of the screen)

<!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" xml:lang="en" lang="en">

Is there a preferred doctype to use with maps? Any wisdom would be
greatly appreciated

Thanks
-J

here is the code I used
<html>
<head>
<script type="text/javascript"
src="http://api.maps.yahoo.com/ajaxymap?v=3.7&appid=YahooDemo"></script>
<style type="text/css">
#map{
height: 75%;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>

<script type="text/javascript">
// Create a map object
var map = new YMap(document.getElementById('map'));

// Add map type control
map.addTypeControl();

// Set map type to either of: YAHOO_MAP_SAT, YAHOO_MAP_HYB, YAHOO_MAP_REG
map.setMapType(YAHOO_MAP_SAT);

// Display the map centered on a geocoded location
map.drawZoomAndCenter("San Francisco", 3);
</script>
</body>
</html>





Mon Jan 21, 2008 12:59 am

juanvazquez23
Offline Offline
Send Email Send Email

Forward
Message #127 of 259 |
Expand Messages Author Sort by Date

Hi everyone, I am fairly new to web programming and I was wondering if anyone could explain why I have the following problem with the demo code for Ymaps. The...
juanvazquez23
Offline Send Email
Jan 21, 2008
12:59 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help