addTileOverlay getTile function not always working as expected.
See original GitHub issueI’m submitting a … (check one with “x”) [ ] question [x] any problem or bug report [ ] feature request
The plugin version: (check one with “x”) [x] 2.0-beta3 (github) [ ] 2.0 (npm)
If you choose ‘problem or bug report’, please select OS: (check one with “x”) [x] Android [ ] iOS
cordova information: (run $> cordova plugin list
)
com.googlemaps.ios 2.4.0 "Google Maps SDK for iOS"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googlemaps 2.0.9-beta-20170914-1830 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
If you use @ionic-native/google-maps
, please show me the package.json
Current behavior:
I try overlay a whole bunch of tiles which are on s3 using the addTileOverlay and getTile function. I have multiple polygons which I change between and zoom in and out different levels and pan around the map etc.
I store the tile overlay object and then whenever I change to a new polygon I remove the previous tile overlay object and add the new one.
Expected behavior:
Generally with the first polygon I select, the tiles overlay correctly and I can zoom in and out and they adjust correctly. However when I change back and forth between polygons (removing the tileOverlays each time), when I log to the console the x,y and zoom parameters they jump around between the different zoom levels. Then it keeps logging to the console multiple times even though I am not moving around the map at all.
Here is an image of the console log of the x,y,zoom when the map is dead still.
If I keep the map still for long enough (possibly 2/3 minutes) it eventually starts getting the correct x,y and zoom and then the tiles overlay.
Is this a known issue / work around available?
Or is it possibly due to the fact that I am zooming in too quickly and for some reason the getTile function can’t handle it?
I have attached a function “overlayNewTiles()” and if I say keep running that function and refreshing the tiles it seems to keep going back to a lower zoom level instead of starting immediately at the current zoom level of the map.
Steps to reproduce:
Screen capture or video record:
Related code, data or error log (please format your code or data):
overlayNewTiles() {
this.currentTileOverlay.remove();
this.map.addTileOverlay({
tileSize: 256,
getTile: function(x, y, zoom) {
console.log(x,y,zoom);
}).then(tileOverlay => {
// Keep track of the tile overlay
this.currentTileOverlay = tileOverlay;
})
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:52 (32 by maintainers)
Top GitHub Comments
It seems you steal Satellite images from Google Maps. https://s3.amazonaws.com/aero-test-data/2/visible/19/307263/223849.png
This is really prohibited by the Google Maps API Terms of Usage
- 10.5 Intellectual Property Restrictions.
b. No derivative works. You will not modify or create a derivative work based on any Content unless expressly permitted to do so under these Terms.
Capturing the satellite images, modify them, and storing and providing as your app contents is agains this rule.
I don’t help you anymore.
For that specific boundary, I have 3 different layers (as the drone flew with both multispectral and visual camera).
See visual below:
See plant health (red and green) below:
See contours layer below (height information from the stitching the raw data together)
Google maps does not provide all these additional layers. I just did not include them with my project because for the purpose of the demo I thought it was easiest just to include the visual layer.