示例#1
0
        public TileOverlay AddTileOverlay([NotNull] TileOverlayOptions tileOverlayOptions)
        {
            if (GoogleMapUtils.IsPlatformNotSupported)
            {
                return(new TileOverlay());
            }

            CheckIfDismissed();

            if (!tileOverlayOptions.HasTileProvider)
            {
                throw new ArgumentException("tileOverlayOptions must have tile provider");
            }


#if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS
            var options    = Json.Serialize(tileOverlayOptions.ToDictionary());
            var overlayPtr = _googleMapsViewTileOverlay(_mapPtr, options);
            return(new TileOverlay(overlayPtr, _mapPtr));
#endif


#pragma warning disable 0162
            var overlayAJO = _ajo.MainThreadCallAJO("addTileOverlay", tileOverlayOptions.ToAJO());
            return(new TileOverlay(overlayAJO));

#pragma warning restore 0162
        }
示例#2
0
        public TileOverlay AddHeatmapWithDefaultLook([NotNull] List <LatLng> data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }

            if (GoogleMapUtils.IsPlatformNotSupported)
            {
                return(new TileOverlay());
            }

            CheckIfDismissed();

            var heatmapTileProvider = new HeatmapTileProvider.Builder().Data(data).Build();
            var options             = new TileOverlayOptions().TileProvider(heatmapTileProvider);

            return(AddTileOverlay(options));
        }