-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- Api Maps
- Ubuntu/React
- MarkerWithLabel Version ^2.0.14
Steps to reproduce
- Go to the basic example: https://googlemaps.github.io/js-markerwithlabel/examples/basic.html
- Click on any marker
- No InfoWindow shows up
Code example
function initMap() {
var latLng = new google.maps.LatLng(49.47805, -123.84716);
var homeLatLng = new google.maps.LatLng(49.47805, -123.84716);
var map = new google.maps.Map(document.getElementById("map_canvas"), {
zoom: 12,
center: latLng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
});
var marker1 = new markerWithLabel.MarkerWithLabel({
position: homeLatLng,
draggable: false,
clickable: false,
map: map,
labelContent: "$425K",
labelAnchor: new google.maps.Point(-21, 3),
labelClass: "labels", // the CSS class for the label
labelStyle: { opacity: 0.75 },
});
var marker2 = new markerWithLabel.MarkerWithLabel({
position: new google.maps.LatLng(49.475, -123.84),
draggable: true,
map: map,
labelContent: "$395K",
labelAnchor: new google.maps.Point(-21, 3),
labelClass: "labels", // the CSS class for the label
labelStyle: { opacity: 1.0 },
});
var iw1 = new google.maps.InfoWindow({
content: "Home For Sale",
});
var iw2 = new google.maps.InfoWindow({
content: "Another Home For Sale",
});
google.maps.event.addListener(marker1, "click", function (e) {
iw1.open(map, this);
});
google.maps.event.addListener(marker2, "click", function (e) {
iw2.open(map, this);
});
}
jdudley1123 and SaifAqqad
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.