#region Disclaimer / License
// Copyright (C) 2010, Jackie Ng
// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie@gmail.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
#endregion
using System;
using System.Collections.Generic;
using System.Text;
using OSGeo.MapGuide.ObjectModels.MapDefinition;
using OSGeo.MapGuide.MaestroAPI.Mapping;
using System.Drawing;
namespace OSGeo.MapGuide.MaestroAPI.Services
{
///
/// Provides services for interaction with the runtime map
///
public interface IMappingService : IService
{
///
/// Creates a new runtime map instance from an existing map definition.
///
///
///
RuntimeMap CreateMap(IMapDefinition mapDef);
///
/// Creates a new runtime map instance from an existing map definition. Meters per unit
/// is calculated from the Coordinate System WKT of the map definition.
///
///
///
///
RuntimeMap CreateMap(IMapDefinition mapDef, double metersPerUnit);
///
/// Creates a new runtime map instance from an existing map definition. Meters per unit
/// is calculated from the Coordinate System WKT of the map definition.
///
///
/// Calculation of meters-per-unit may differ between implementations. This may have an adverse
/// effect on things such as rendering and measuring depending on the underlying implementation
///
/// If you are certain of the meters-per-unit value required, use the overloaded method that
/// accepts a metersPerUnit parameter.
///
///
///
///
RuntimeMap CreateMap(string runtimeMapResourceId, string baseMapDefinitionId);
///
/// Creates a new runtime map instance from an existing map definition
///
///
///
///
///
RuntimeMap CreateMap(string runtimeMapResourceId, string baseMapDefinitionId, double metersPerUnit);
///
/// Creates a new runtime map instance from an existing map definition. Meters per unit
/// is calculated from the Coordinate System WKT of the map definition.
///
///
/// Calculation of meters-per-unit may differ between implementations. This may have an adverse
/// effect on things such as rendering and measuring depending on the underlying implementation
///
/// If you are certain of the meters-per-unit value required, use the overloaded method that
/// accepts a metersPerUnit parameter.
///
///
///
///
RuntimeMap CreateMap(string runtimeMapResourceId, IMapDefinition mdf);
///
/// Creates a new runtime map instance from an existing map definition
///
///
///
///
///
RuntimeMap CreateMap(string runtimeMapResourceId, IMapDefinition mdf, double metersPerUnit);
///
/// Opens an existing runtime map instance
///
///
///
RuntimeMap OpenMap(string runtimeMapResourceId);
///
/// Renders a dynamic overlay image of the map
///
///
///
///
///
System.IO.Stream RenderDynamicOverlay(RuntimeMap map, MapSelection selection, string format);
///
/// Renders a dynamic overlay image of the map
///
///
///
///
///
///
System.IO.Stream RenderDynamicOverlay(RuntimeMap map, MapSelection selection, string format, bool keepSelection);
///
/// Renders the runtime map.
///
/// The resource id.
/// The x.
/// The y.
/// The scale.
/// The width.
/// The height.
/// The dpi.
///
System.IO.Stream RenderRuntimeMap(string resourceId, double x, double y, double scale, int width, int height, int dpi);
///
/// Renders the runtime map.
///
/// The resource id.
/// The x1.
/// The y1.
/// The x2.
/// The y2.
/// The width.
/// The height.
/// The dpi.
///
System.IO.Stream RenderRuntimeMap(string resourceId, double x1, double y1, double x2, double y2, int width, int height, int dpi);
///
/// Renders the runtime map.
///
/// The resource id.
/// The x.
/// The y.
/// The scale.
/// The width.
/// The height.
/// The dpi.
/// The format.
///
System.IO.Stream RenderRuntimeMap(string resourceId, double x, double y, double scale, int width, int height, int dpi, string format);
///
/// Renders the runtime map.
///
/// The resource id.
/// The x1.
/// The y1.
/// The x2.
/// The y2.
/// The width.
/// The height.
/// The dpi.
/// The format.
///
System.IO.Stream RenderRuntimeMap(string resourceId, double x1, double y1, double x2, double y2, int width, int height, int dpi, string format);
///
/// Renders the runtime map.
///
/// The resource id.
/// The x.
/// The y.
/// The scale.
/// The width.
/// The height.
/// The dpi.
/// The format.
/// if set to true [clip].
///
System.IO.Stream RenderRuntimeMap(string resourceId, double x, double y, double scale, int width, int height, int dpi, string format, bool clip);
///
/// Renders the runtime map.
///
/// The resource id.
/// The x1.
/// The y1.
/// The x2.
/// The y2.
/// The width.
/// The height.
/// The dpi.
/// The format.
/// if set to true [clip].
///
System.IO.Stream RenderRuntimeMap(string resourceId, double x1, double y1, double x2, double y2, int width, int height, int dpi, string format, bool clip);
///
/// Renders the legend for the specified to the requested size and format
///
///
///
///
///
///
///
System.IO.Stream RenderMapLegend(RuntimeMap map, int width, int height, Color backgroundColor, string format);
}
}