react-google-maps-api icon indicating copy to clipboard operation
react-google-maps-api copied to clipboard

Integrate markerwithlabel to extend Marker styling options

Open bluiska opened this issue 4 years ago • 3 comments

Hi there,

So i've needed to display labels on my markers and the standard <Marker> components only allows for the standard label provided by google maps. It could be nice to integrate the functionality of markerwithlabel found here.

Theoretically, everything is the same as the Marker class except with additional label parameters and should almost just be a copy of the <Marker> component.

For now, I'll just use the project directly but I thought I'll post here to maybe see that added to the library.

bluiska avatar Mar 30 '20 17:03 bluiska

@bluiska If you can provide PR, I will publish it ASAP.

JustFly1984 avatar Apr 17 '20 20:04 JustFly1984

@bluiska If you can provide PR, I will publish it ASAP.

Hey, at the moment I don't have time as I need to finish up the project the library is being used in but I will get back to it. I'll be able to look at this in a month time as that's when my deadline is. I reverted the changes in my own project as it turns out I didn't need it in the end but it's still a nice thing to have.

bluiska avatar Apr 22 '20 09:04 bluiska

Personally, all I did was add the library and everywhere where Marker was being used in the <Marker> component, I replaced it with MarkerWithLabel. As the library is based on google.maps.Marker and just extends it with functionality, this worked straight away (though I did not run any tests)

bluiska avatar Apr 22 '20 09:04 bluiska