ComponentOne Maps for ASP.NET Web Forms
Features / Map Source / Change the Map Source
In This Topic
    Change the Map Source
    In This Topic
    Complete the following steps to change the source of the map:

    In the Designer

    1. Click the smart tag to open the C1Maps Tasks Menu.
    2. Click the drop-down arrow next to the Source property and select the source as per your requirement.

    In Source View

    Set the Source property within the <c1:C1Maps> tag, as shown below, to change the source of the C1Maps control.

    Source View
    Copy Code
    <c1:C1Maps ID="C1Maps1" runat="server" Height="500px"
     Width="600px" Source="BingMapsRoadSource">
    </c1:C1Maps>
    

    In Code

    1. Add the following code to the Page_Load event:
      C#
      Copy Code
      C1Maps1.Source = C1.Web.Wijmo.Controls.
      C1Maps.MapSource.BingMapsRoadSource;
      

      VB
      Copy Code
      C1Maps1.Source = C1.Web.Wijmo.Controls.
      C1Maps.MapSource.BingMapsRoadSource
      
    2. Run the project.

    What You've Accomplished

    The following image depicts a C1Maps control whose source has been set to Bing Maps Road source.