SavedWebPages property
Returns the SavedWebPages collection associated with the specified map. Read-only.
Applies to
Objects: Map
Syntax
object.SavedWebPages
Parameters
Part |
Description |
---|---|
object |
Required. An expression that returns a Map object. |
Example
[Microsoft Visual Basic 6.0]
Sub SaveAWebPage()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objRoute As MapPoint.Route
Dim objSW As MapPoint.SavedWebPage
'Set up the application
Set objMap = objApp.ActiveMap
Set objRoute = objMap.ActiveRoute
objApp.Visible = True
objApp.UserControl = True
'Create a route
objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
objRoute.Calculate
'Use SavedWebPages property to create a saved Web page
Set objSW = objMap.SavedWebPages.Add("SavedWeb", _
objRoute.Waypoints.Item(1).Location, "New Title", _
True, False, True, 60, 120, False, True, False, True)
objSW.Save
End Sub
[C#]
void SaveAWebPage()
{
MapPoint.Route objRoute;
MapPoint.SavedWebPage objSW;
//Set up application
objApp.Visible = true;
objApp.UserControl = true;
objMap = objApp.ActiveMap;
objRoute = objMap.ActiveRoute;
//Create a Route
object item = 1;
ojRoute.Waypoints.Add(objMap.FindResults("Seattle, WA").get_Item(ref item), "Seattle, WA");
objRoute.Waypoints.Add(objMap.FindResults("Redmond, WA").get_Item(ref item), "Redmond, WA");
objRoute.Calculate();
//Create a saved web page, zoomed in on first waypoint
objSW = objMap.SavedWebPages.Add("SavedWeb", objRoute.Waypoints.get_Item(ref item).Location, "New Title", true, false, true, 200, 400, false, true, true, true);
objSW.Save();
}
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.