Start
Starts Mapzania services such as layer-source detection, logging, license-validation and endpoint-activation.
Parameters
Name | Required | Type | Description |
---|---|---|---|
app | Yes | System.Web.Http.HttpConfiguration | The configuration object of the web server instance. |
options | No | Mapzania.Options | Options for start-up. |
Options
Name | Default | Type | Description |
---|---|---|---|
LicenseKey | String.Empty | String | The license key of your installation of Mapzania. You can obtain licenses here. |
MapStylerAccess | AllowLocal | Mapzania.Access | An enum that sets the web visibility of the MapStyler. Valid values are: - AllowNone (MapStyler is disabled) -AllowLocal (MapStyler can be run on local machine) -AllowAll (MapStyler can be run from any machine) |
ServicesAccess | AllowLocal | Mapzania.Access | An enum that sets the web visibility of the ROOT/services endpoints in the REST API. Valid values are: - AllowNone (endpoints are disabled) -AllowLocal (endpoints can be accessed on local machine) -AllowAll (endpoints can be accessed from any machine) |
Example
void Application_Start(object sender, EventArgs e)
{
...
// Start Mapzania
Mapzania.Services.Start(this, new Options {
MapStylerAccess = Access.AllowLocal,
ServicesAccess = Access.AllowNone,
LicenseKey = "<add licence key here>"
});
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
...
}