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.