I'm currently integrating OverlappingMarkerSpidifier using SebM Angular 2 Google Maps on angular2 2.0.0.
After successfully loading the google maps API with the GoogleMapsAPIWrapper imported from the sebm module, I am running into an issue when executing the OMW script that I downloaded from the repository and added a module.exports statement to. The error message I'm encountering is:
Uncaught TypeError: this.constructor.ProjHelper is not a constructor
Below is the code snippet of the OverlappingMarkerSpiderfier (OMW) code:
/** @preserve OverlappingMarkerSpiderfier
https://github.com/jawj/OverlappingMarkerSpiderfier
Copyright (c) 2011 - 2013 George MacKerron
Released under the MIT licence: http://opensource.org/licenses/mit-license
Note: The Google Maps API v3 must be included *before* this code
*/
module.exports = function () {
// Code implementation for OverlappingMarkerSpiderfier here...
};
Here's how I'm attempting to use the OverlappingMarkerSpiderfier function in my code:
let omw = require('../../scripts/overlapping-marker-spidifier.js');
this.overlappingMarkerSpidifier = omw()(this.map);
I have tried to delay the execution of the script until it's required and then manually call it to expose the OverlappingMarkerSpiderfier function. Can anyone provide guidance on how to resolve this issue?