Matt Elhotiby
Matt Elhotiby

Reputation: 44086

Google maps V3 GSize has changed

I am switching google maps from v2 to v3 and I am running into a problem with finding the conversion from GSize. Does anyone know how to make the change.

opts = {
    'labelText': infoname,
    'labelClass': 'citymarkers',
    'labelOffset': new GSize(-35, -40)
};

var marker = new LabeledMarker( 
    new google.maps.LatLng(this.lat, this.lng), 
    opts);

this.labelOffset = options.labelOffset || new GSize(0, 0);

Upvotes: 2

Views: 4808

Answers (2)

Daniel Vassallo
Daniel Vassallo

Reputation: 344461

The LabeledMarker class you are using is a third-party extension and not part of the Google Maps API.

There is a utility library for the v3 API similar to the v2 version, and there is an extension called MarkerWithLabel. You may want to try that instead.

You may also be interested in checking out the following article for an alternative v3 solution:

Upvotes: 1

Tom van Enckevort
Tom van Enckevort

Reputation: 4198

You should probably be using the Size class instead.

Upvotes: 0

Related Questions