Exemple #1
0
    public static MapZoomLevel Init(MapZoomLevel level)
    {
        level.MapScale  = Mathf.Clamp(level.MapScale, 1f, float.MaxValue);
        level.IconScale = Mathf.Clamp(level.IconScale, 1f, float.MaxValue);

        return(level);
    }
Exemple #2
0
        public void WriteConfiguration(PropertySetter propertySetter)
        {
            // write markers
            var count = Markers.Count;

            propertySetter(Constants.MarkersCount, count.ToString());

            for (int index = 0; index < count; index++)
            {
                var marker = Markers[index];
                propertySetter(GetIndexedName(Constants.MarkerId, index), marker.DeviceId.ToString());
                propertySetter(GetIndexedName(Constants.MarkerColor, index), MarkerNames.GetName(marker.MarkerType));
            }

            // write map type
            propertySetter(Constants.GMapProviderType, MapProviderNames.GetName(MapType));

            // write tooltip
            propertySetter(Constants.ToolTipAppearance, ToolTipAppearanceNames.GetName(ToolTip.Appearance));
            propertySetter(Constants.ToolTipText, ToolTipTextNames.GetName(ToolTip.TextType));

            // write timout in seconds
            propertySetter(Constants.TimeoutSeconds, TimeoutInSeconds.ToString());

            // write show zoom panel
            propertySetter(Constants.ShowZoomPanel, ShowZoomPanel.ToString());

            // write map zoom level
            propertySetter(Constants.MapZoomFactor, MapZoomLevel.ToString());

            // write map position
            propertySetter(Constants.MapPositionLng, MapPosition.Lng.ToString());
            propertySetter(Constants.MapPositionLat, MapPosition.Lat.ToString());
        }
Exemple #3
0
        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendLine("------------------------STATE------------------------");
            builder.AppendLine("Sheet: " + ((Sheet == null) ? "null" : Sheet.ToString()));
            builder.AppendLine("SheetVisibility: " + SheetVisibility.ToString());
            builder.AppendLine("MapCenter: " + ((MapCenter == null) ? "null" : (MapCenter.Position.Latitude.ToString() + ", " + MapCenter.Position.Longitude.ToString())));
            builder.AppendLine("MapZoomLevel: " + MapZoomLevel.ToString());
            builder.AppendLine("MapPitch: " + MapPitch.ToString());
            builder.AppendLine("MapHeading: " + MapHeading.ToString());
            builder.AppendLine("HasSheet: " + HasSheet.ToString());
            builder.AppendLine("HasSheetVisibility: " + HasSheetVisibility.ToString());
            builder.AppendLine("HasMapCenter: " + HasMapCenter.ToString());
            builder.AppendLine("HasMapZoomLevel: " + HasMapZoomLevel.ToString());
            builder.AppendLine("HasMapPitch: " + HasMapPitch.ToString());
            builder.AppendLine("HasMapHeading: " + HasMapHeading.ToString());
            builder.AppendLine("-----------------------------------------------------");
            return(builder.ToString());
        }