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...
Message search is now enhanced, find messages faster. Take it for a spin.

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
Problem regarding showing map calling it from ajax function   Message List  
Reply | Forward Message #176 of 257 |
Hi guys, I'm having a problem trying to show a map from within a webpage.

The webpage is a detail page showing office center's information, the
information is called and displayed through an ajax function that
calls another php file...

the problem is when you select to view the map, it only show the blank
div but not the map, but when I put the javascript code inside the the
main php it shows flawlessly, Is this has something to do with the api
key?

here's the code:

main php:

<script type='text/javascript'
src='http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=f.k_40PV34GQsXxKH3FtjHgQ.q9E\
hO..zgipI0U_7N6.DRspGaudelKR.E1cl1i.6g--
'></script>

on the secondary php (called from ajax function) is this code:
case "map":
$resultInfo = "<h2>Map</h2>";
$yahooString = <<<EOF
<div id="ymap">
<script type="text/javascript">
// Create a map object
var map = new YMap(document.getElementById('ymap'));
// Display the map centered on a geocoded location
map.drawZoomAndCenter("San Francisco", 6);
</script>
EOF;
$resultInfo .= $yahooString;


btw the files are located
main php: root folder 'center.php'
secondary php on '/classes/centerProcess.php'

this is an example page:
http://test.pbcenters.com/center.php?cid=111

any help or directions would be greatly appreciated...

Memo.




Fri Aug 8, 2008 12:58 am

peterpunks
Offline Offline
Send Email Send Email

Forward
Message #176 of 257 |
Expand Messages Author Sort by Date

Hi guys, I'm having a problem trying to show a map from within a webpage. The webpage is a detail page showing office center's information, the information is...
peterpunks
Offline Send Email
Aug 8, 2008
12:58 am

Are we supposed to save the files in .php files or .html files? ... webpage. ... ...
c_suereth
Offline Send Email
Aug 10, 2008
4:29 pm
Advanced

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