Open lucasgerard opened 8 years ago
same issue ^
anyone could find a solution for this?
Justo remove
/**
* @param {Object} gMapsApi The Google Maps API instance (usually `google.maps`)
* @return {Function} The instantiable MarkerWithLabel class
*/
module.exports = function(gMapsApi) {
and
return MarkerWithLabel;
}
replace all occurrences of gMapsApi with google.maps, use this code to init the map after markerwithlabel.js (renamed form index.js) is loaded because it needs loaded maps api and we use callback parameter in a googleapis load tag (the tag must be after init functions):
<script type="text/javascript">
function initMap() {
// you code to init a map:
// var map = new google.maps.Map(...);
// var marker = new MarkerWithLabel(...);
// etc.
}
function init() {
var file="markerwithlabel.js";
var script = document.createElement("script");
script.type = "text/javascript";
script.src = file;
script.onload = function(){
initMap()
};
document.body.appendChild(script);
}
</script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&key=YOUR_KEY&libraries=places&callback=init"></script>
Hi,
I've suddenly have issues with MarkerWithLabel, on the following URL: https://parisjetaide-tests.herokuapp.com/, with config:
Any idea where does it come from?
Thanks!