Ejemplo n.º 1
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());
        }