I created a map as normal and that all works like it should. I added another canvas and added a map as a child to that canvas. The dew map canvas only covers part of the main canvas in the scene. A second canvas containing meta data about the driving directions such as duration, length, segments.... etc, covers the rest of the main canvas so the two canvases(containg the directions and the secondary map) are displayed covering the original map.
Then I attached a script to the map and removed the "DriveToPointByRoute". In the script I added this as a start fucntion
void Start()
{
map = new OnlineMaps();
map = new OnlineMaps();
lat = 29.617432;
lng = -95.60593;
map.SetPosition(lng, lat);
control = new OnlineMapsTileSetControl();
map.zoom = 10;
}
the result:
Both maps are centered in the same location even though they both have different lat/long values although the zoom values are different. (Original map - 12.5, 2nd Map - 10)
The canvas with the second map is resized to the same size as the main canvas (original map). When running in the editor, I can deactivate each map and see the difference in scale as they are sitting directly on top of each other in the scene. The orginal map's canvas is set to cover the entire view of the camera in the scene. The second map is resized to also fill the entire view of the camera. (the same size as the original map's canvas)
The plan:
Ask for an address or place, get directions and display two canvases on top of the original map's canvas. One of the "direction" canvases would basically cover half of the camera's view and contain the map with a route Layer displayed to show the user of the route. The other canvas would cover the other half of the camera's view and would contain the direction meta data. Both canvases would fill the entire camera view. Once the user has seen the route and duration and want to proceed, they would select a button that would deactivate the second map and meta data canvases. This would display the original map zoomed up close to the user's position at the center of the map. The map would then follow user's position on map as they move.
If they do not want to proceed after seeing the route, the user would cancel the route and the two canvases (second map and meta data) would be deactivated and the original map would be centered on the users position at the default scale for the application.