I am attempting to create a Google Maps Overlay View. I have this code here in ES5 telling me to initialize an object in my marker prototype like below:
MainMarker.prototype = new google.maps.OverlayView();
How do I exactly convert this to ES6?
For inheritance, such as Child.prototype = Object.create(Parent.prototype)
, to this in ES6, we can write like
class Child extends Parent {
constructor () {
super();
}
}
But how to come about with the first one?