React-google-maps: Ability to center Marker Icon

Created on 19 Nov 2017  路  3Comments  路  Source: tomchentw/react-google-maps

I've been all through the docs. The Marker component will place a custom icon using the bottom center as the anchor point. The ability to place the icon with the center/center as the anchor point would be nice. From what I've seen this isn't possible. Thanks.

Most helpful comment

@wayofthefuture In case you haven't found it yet: This works:

icon: {
        url: 'icon.png',
        scaledSize: { width: 30, height: 30},
        anchor: { x: 15, y: 15 },
      }

All 3 comments

I'm not sure about that either. Please consult official Google Maps JS API instead.

@wayofthefuture In case you haven't found it yet: This works:

icon: {
        url: 'icon.png',
        scaledSize: { width: 30, height: 30},
        anchor: { x: 15, y: 15 },
      }

@wayofthefuture Perfect! Through all docs I searched your help was survivor <3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnantoni picture johnantoni  路  3Comments

bansalvks picture bansalvks  路  3Comments

madbean picture madbean  路  3Comments

Mahmood004 picture Mahmood004  路  3Comments

timkraut picture timkraut  路  3Comments