Beispiel #1
0
 public void mShow()
 {
     IsPopup = true;
     GetComponent <AudioSource>().PlayOneShot(popupSound);
     Button1.Enable();
     Button2.Enable();
     Button3.Enable();
     StopCoroutine("PopIn");
     StopCoroutine("PopOut");
     StopCoroutine("CheckProgress");
     StartCoroutine("PopIn");
 }
        public void UpdateBaseLayer(string selection, string source)
        {
            if (source.Equals(StylePopupContent.CartoVectorSource))
            {
                // Nutiteq styles are bundled with the SDK, we can initialize them via constuctor
                if (selection.Equals(StylePopupContent.Voyager))
                {
                    CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleVoyager);
                }
                else if (selection.Equals(StylePopupContent.Positron))
                {
                    CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStylePositron);
                }
                else
                {
                    CurrentLayer = new CartoOnlineVectorTileLayer(CartoBaseMapStyle.CartoBasemapStyleDarkmatter);
                }
            }
            else if (source.Equals(StylePopupContent.CartoRasterSource))
            {
                if (selection.Equals(StylePopupContent.HereSatelliteDaySource))
                {
                    CurrentLayer = new CartoOnlineRasterTileLayer("here.satellite.day@2x");
                }
                else if (selection.Equals(StylePopupContent.HereNormalDaySource))
                {
                    CurrentLayer = new CartoOnlineRasterTileLayer("here.normal.day@2x");
                }
            }

            if (source.Equals(StylePopupContent.CartoRasterSource))
            {
                LanguageButton.Disable();
            }
            else
            {
                LanguageButton.Enable();
            }

            MapView.Layers.Clear();
            MapView.Layers.Add(CurrentLayer);

            InitializeVectorTileListener();
        }