Changes between Version 4 and Version 5 of maestro/MaestroAPI/samples/RuntimeMap


Ignore:
Timestamp:
Aug 26, 2008, 3:52:41 AM (16 years ago)
Author:
ksgeograf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • maestro/MaestroAPI/samples/RuntimeMap

    v4 v5  
    11
    2 == Utilizing RuntimeMap via Meastro API ==
     2== Utilizing !RuntimeMap via Meastro API ==
    33This page describes how to use the MaestroAPI from the [wiki:maestro MapGuide Maestro] project in your own application.
    44
    5 Just a quick one on creating and using RuntimeMaps via Meastro API. To get Meastro API going please download latest Meastro package, then reference OSGeo.MapGuide.MaestroAPI.dll and MapGuideDotNetApi.dll only. This example uses Maestro API HttpServerConnection object which talks to the MG's mapagent.fcgi via HTTP. In other words - your code (i.e. ASP.NET page) may reside on remote computer calling MG server via HTTP.
     5Just a quick one on creating and using !RuntimeMaps via Meastro API. To get Meastro API going please download latest Meastro package, then reference OSGeo.!MapGuide.MaestroAPI.dll and !MapGuideDotNetApi.dll only. This example uses Maestro API !HttpServerConnection object which talks to the MG's mapagent.fcgi via HTTP. In other words - your code (i.e. ASP.NET page) may reside on remote computer calling MG server via HTTP.
    66
    77(VB.NET)
     
    2828Dim mapName As String = res.Name
    2929
    30 ' Now we decide on a name for our runtime map (stored in a Session)
    31 Dim rtMapId As String = "Session:" + conn.SessionID + "//" + mapName + ".Map"
     30'Make a new ResourceIdentifier class to point to the runtime map in the session repository.
     31Dim rtMapId as String = new ResourceIdentifier(mapName, ResourceTypes.RuntimeMap, conn.SessionID)
    3232
    3333' Finally, we're telling HttpServerConnection to create runtime map
     
    3838}}}
    3939
    40 Having a reference to RuntimeMap enables us manipulating Library-resident map "clone" (see conn.CreateRuntimeMap) sitting in a Session. Don't forget - each MG Session may have different instance of RuntimeMap in it. When RuntimeMap is created, it's properties (including layers, layer visibility, etc.) is inherited from the original MapDefinition. Let's change visibility of PARCELS layer initially being turned off:
     40Having a reference to !RuntimeMap enables us manipulating Library-resident map "clone" (see conn.!CreateRuntimeMap) sitting in a Session. Don't forget - each MG Session may have different instance of !RuntimeMap in it. When !RuntimeMap is created, it's properties (including layers, layer visibility, etc.) is inherited from the original !MapDefinition. Let's change visibility of PARCELS layer initially being turned off:
    4141
    4242{{{