Draw object layer

From Maria GDK Wiki
Revision as of 14:39, 2 April 2025 by Ths (talk | contribs)
Jump to navigation Jump to search

This page details the setup of the Maria DrawObjectLayer.

Example

   // Symbol service client and symbol processor is shared between different layers.
   SymbolPointServiceClient = new SymbolPointServiceClient(bindingFactory.NewFromConfigurationFile("SymbolPointService"), endpointAddressFactory.NewFromConfigurationFile("SymbolPointService"), 1000);
   _symbolRequestProcessor = new SymbolRequestProcessor(SymbolPointServiceClient);

   ....

   // There should be only one draw object system factory in the application.
   _drawObjectSystemFactory = new DrawObjectSystemFactory(_symbolRequestProcessor);
   
   // Common draw object resources, may be used throughout the application.
   _drawObjectCommon = _drawObjectSystemFactory.CommonResources;

   // Connect to GeoObject service, if necessary. 
   _drawObjectCommon.GeoObjectClientStores.ConnectToService(new Uri("http://localhost:5097"));
            
   // Create a draw object layer with an in-memory store.
   var storeInfo = new StoreInfo() { Id = "InMemory", IsInProcessStore = true };
   _drawObjectLayer = _drawObjectSystemFactory.CreateLayer(GeoControlViewModel, storeInfo);