Google maps api - kml load (php)
I'm trying to load my kml files ( hosted on my server) dynamically,
this example works
var ctaLayer = new google.maps.KmlLayer('http://my开发者_Python百科host.pt/perc/perc1.kml',{suppressInfoWindows: true});
but I need something like
<?php $var= ' users/hash/perc1.kml'; ?>
var ctaLayer = new google.maps.KmlLayer('http://myhost.pt/<?php $var; ?>',{suppressInfoWindows: true});
so I need to concat the url, I really have no idea if I can do this
I hope to have been elucidative.. if somebody could help me i'm thankful
you almost have it,
change
<?php $var; ?>
to
<?php echo $var; ?>
精彩评论