title: Convert identical objects from different namespaces?
body: <p>These are the errors:</p>
  
  <pre><code>Error   1   Cannot implicitly convert type 'Plantool.xRoute.Point' to 'Plantool.xMap.Point' 
  Error   2   Cannot implicitly convert type 'Plantool.xRoute.Point' to 'Plantool.xMap.Point' 
  Error   3   Cannot implicitly convert type 'Plantool.xRoute.LineString' to 'Plantool.xMap.LineString'
  </code></pre>
  
  <p>I have this code which comes with a namespace.</p>
  
  <pre><code>using Plantool; //Contains xMap, xServer, xLocate
  </code></pre>
  
  <p>And this is the function in question.</p>
  
  <pre><code>    /* createMap()
       * Input: WaypointDesc[], Route
       * Output: string mapURL
       * Edited 21/12/12 - Davide Nguyen
       */
      private static string createMap(xRoute.WaypointDesc[] waypointDesc, xRoute.Route route)
      {
          #region boundingBox
          // Set boundingBox fand use corners from the calculated route
          xMap.BoundingBox boundingBox = new xMap.BoundingBox();
          boundingBox.leftTop = route.totalRectangle.rightTop;
          boundingBox.rightBottom = route.totalRectangle.leftBottom;
          #endregion
  
          #region mapParams
          // Build mapParams
          xMap.MapParams mapParams = new xMap.MapParams();
          mapParams.showScale = true;
          mapParams.useMiles = false;
          #endregion
  
          #region imageInfo
          // Create imageInfo and set the frame size and image format. NOTE: 1052; 863
          xMap.ImageInfo imageInfo = new xMap.ImageInfo();
          imageInfo.format = xMap.ImageFileFormat.PNG;
          imageInfo.height = 1052;
          imageInfo.width = 863;
          imageInfo.imageParameter = "";
          #endregion
  
          #region layers
          // Create a line from the calculated route
          xMap.LineString[] lineStrings = new xMap.LineString[] { route.polygon };
          xMap.Lines[] lines = new xMap.Lines[1];
          xMap.LineOptions options = new xMap.LineOptions();
          xMap.LinePartOptions partoptions = new xMap.LinePartOptions();
          partoptions.color = new xMap.Color();
          partoptions.visible = true;
          partoptions.width = -10;
          options.mainLine = partoptions;
  
          lines[0] = new xMap.Lines();
          lines[0].wrappedLines = lineStrings;
          lines[0].options = options;
  
          // Define customLayer that contains the object lines and set layers.
          xMap.CustomLayer customLayer = new xMap.CustomLayer();
          customLayer.visible = true;
          customLayer.drawPriority = 100;
          customLayer.wrappedLines = lines;
          customLayer.objectInfos = xMap.ObjectInfoType.NONE;
          customLayer.centerObjects = true;
          xMap.Layer[] layers = new xMap.Layer[] { customLayer };
          #endregion
  
          #region includeImageInResponse
          // Set argument includeImageInResponse to false (default).
          Boolean includeImageInResponse = false;
          #endregion
  
          // Return object map using the following method.
          xMap.Map map = xMapClient.renderMapBoundingBox(boundingBox, mapParams, imageInfo, layers, includeImageInResponse, null);
  
          // Retrieve the image
          string result = "http://" + map.image.url;
  
          // Return the drawn map
          return result;
      }
  </code></pre>
  
  <p>The problem lies with the <code>boundingBox</code> object and the <code>lineString</code> object. <code>route.totalRectangle</code> contains a <code>Point</code> object from the <code>xRoute</code> namespace which is identical to that of <code>xMap</code>. Is there anyway to copy or convert it? </p>
  
  <p>This issue does not seem to happen in java examples, but it does in C#. I am sure that if I can solve this error, the other ones will be solved aswell. I have searched my ass off on the API, but it may help you: </p>
  
  <ul>
  <li>xMap:
  <a href="http://xserver.ptvgroup.com/fileadmin/files/PTV-COMPONENTS/DeveloperZone/Documents/PTV_xServer/API/xMapAPI/pages/apidoc.html" rel="nofollow">http://xserver.ptvgroup.com/fileadmin/files/PTV-COMPONENTS/DeveloperZone/Documents/PTV_xServer/API/xMapAPI/pages/apidoc.html</a></li>
  <li>xRoute: <a href="http://xserver.ptvgroup.com/fileadmin/files/PTV-COMPONENTS/DeveloperZone/Documents/PTV_xServer/API/xRouteAPI/pages/apidoc.html" rel="nofollow">http://xserver.ptvgroup.com/fileadmin/files/PTV-COMPONENTS/DeveloperZone/Documents/PTV_xServer/API/xRouteAPI/pages/apidoc.html</a></li>
  </ul>
  
  <p>Still digging myself.</p>