I’m trying to create a MarkerShape object with google maps api (the last version, 3.9.2). Unfortunately, it seems that MarkerShape api is not loaded: here is what firebug’s console shows me:
>>> google.maps.version
"3.9.2"
>>> google.maps.MarkerShape
undefined
Am I doing something wrong ? The last version of gmaps documentation for MarkerShape is here: https://developers.google.com/maps/documentation/javascript/reference#MarkerShape
Thx
Edit: here is an example on jsfiddle: http://jsfiddle.net/vszHk/6/ or just go to an official example like here https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple and open firebug
I think your problem is you are trying to treat google.maps.MarkerShape as a constructor. It’s just an object, not a constructor.
So doing something like the following is wrong as there isn’t a MarkerShape method in the google.maps object:
To create a MarkerShape you can just create an object literal:
Then you can add this to the object literal you pass to the google.maps.Marker constructor. Eg.