Bug #11

avatar

Argument 1 passed to GMapMarker::addHtmlInfoWindow()

Added by gabriel muñoz 137 days ago. Updated 136 days ago.

Status:New Start:04/20/2010
Priority:Low Due date:
Assigned to:- % Done:

0%

Category:- Spent time: -
Target version:-

Description

error
Catchable fatal error: Argument 1 passed to GMapMarker::addHtmlInfoWindow() must be an instance of GMapInfoWindow, string given, called in C:\xampp\htdocs\v3\modules\phpOnlySamples\test2.php on line 20 and defined in C:\xampp\htdocs\v3\lib\GMapMarker.class.php on line 278

// some places in the world
$addresses = array(
'Graf-Recke-Strasse 220 - 40237 Düsseldorf',
'Avenue des sports 01210 FERNEY-VOLTAIRE - FRANCE',
'44 boulevard Saint-Michel, Paris',
'Route Saclay 91120 Palaiseau',
'Rämistrasse 101, Zürich'
);
foreach ($addresses as $address)
{
$geocoded_address = $gMap->geocode($address);
$gMapMarker = new GMapMarker($geocoded_address->getLat(),$geocoded_address->getLng());

$gMapMarker->addHtmlInfoWindow('<b>Address:</b><br />'.$address);

$gMap->addMarker($gMapMarker);
}

History

Updated by Laurent Bachelier 137 days ago

avatar
  • Priority changed from Urgent to Low

The documentation is incorrect, you should pass a GMapInfoWindow.

To do: fix README

Updated by gabriel muñoz 136 days ago

avatar

GMapDirection.class.php as I can use in
'Region'
/ / Region Used as a bias code for geocoding requests.

an example please

:)

Also available in: Atom PDF