문제

I am having an error when I try to display googlemaps

If I load the googlemaps javascript source

I get this error in firebug

syntax error
[Break on this error] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\nmaps?fil...sor=false (regel 1)

I have this to load the file

<?php if (isset($gmap))?><script type="text/javascript" src="<?php echo __PUBLIEK_PAD; ?>/js/<?php echo $gmap; ?>"></script>

and here is how I set the variables

$key='my-api-key';
$this->view->gmap="http://maps.google.com/maps?file=api&v=2&key=".$key."&sensor=false";
$this->view->js_gmaptest = 'gmaptest.js';

Is there something in here that can cause the problem? I had it working before, but know I don't know anymore.

thanks, richard

도움이 되었습니까?

해결책

Not sure if it's the problem, but the documentation says the beginning of your document should look like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top