Open stevebrowndotco opened 3 years ago
Please try this
getTile: (x: number, y: number, zoom: number) => {
return layerUrl.replace("{zoom}", zoom + "")
.replace("{x}", x + "")
.replace("{y}", y + "");
}
Hello, i followed this exactly
getTile: (x, y, z): string => {
return 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}@1x.png'.replace('{z}', z + '').replace('{x}', x + '').replace('{y}', y + '');
}
I'm running on a real device (android) and when I run Chrome inspect I get this error:
consolelogs.js:50 ERROR Error: Uncaught (in promise): TypeError: Cannot read property '_privateInitialize' of undefined
TypeError: Cannot read property '_privateInitialize' of undefined
Error is traced to here in Map.js:
self.exec.call(self, function() {
tileOverlay._privateInitialize();
delete tileOverlay._privateInitialize;
if (typeof callback === 'function') {
callback.call(self, tileOverlay);
}
}, self.errorHandler, self.__pgmId, 'loadPlugin', ['TileOverlay', options, hashCode]);
Are you running on Capacitor?
Cordova
Could you share the GitHub repository?
I'm submitting a ... (check one with "x")
If you choose 'problem or bug report', please select OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)If you use
@ionic-native/google-maps
, please tell the package.json (only@ionic-native/core
and@ionic-native/google-maps
are fine mostly)Current behavior: On iOS or Android, if I add a tileOverlay, it does not render. Only the underlying google maps is shown. However, on cordova browser it works perfectly.
Expected behavior: I see the tile overlay
Related code, data or error log (please format your code or data):