Home Ask Login Register

Developers Planet

Your answer is one click away!

BRG February 2016

Googlemap_Location does not print the correct map

I am having issue to display an iframe showing a google Map.

    $map = new GoogleMap_Location( 'main' );

    echo $map->getHeaderJS();

    $sql = "SELECT Ortsteil FROM Ortsteile WHERE OrtID = '".$ortsteileID."'";
    $res = mysql_command( $sql );
    $ortsteile = mysqli_result( $res, 0, "Ortsteil" );

<body  onload="onLoad();">
<h4>Map is here</h4>
<td style="border:1px solid #DDDDDD">

    $googlemap = new GoogleMap_Location( '$ortsteile' );
    $googlemap->setWidth( 400 );
  $googlemap->setHeight( 370 );
    $_coords = $googlemap->geoGetCoords( $ortsteile.', Liguria, Italy' );
    $googlemap->setCenterCoords( $_coords['lon'], $_coords['lat'] );
    $googlemap->printMap( );


The query is correct and when i do inspect Element on the website the iframe is there but not showing anything.

Any ideas?


dhruv jadia February 2016

change from

$googlemap = new GoogleMap_Location( '$ortsteile' );


$googlemap = new GoogleMap_Location($ortsteile);

Post Status

Asked in February 2016
Viewed 1,380 times
Voted 10
Answered 1 times


Leave an answer

Quote of the day: live life