There are several ways to accomplish the conversion. The method that we usually suggest is to compute a “transformation matrix” that takes care of converting from the WGS84 coordinate system used by Google Maps (latitude/longitude) to a coordinate system useful to display the locations on your floor plan image (pixels x/y).

These are the steps you need to do to accomplish the conversion:

  1. Choose a floor plan image and take note of the pixel coordinates (pixels x/y) of 3 or more points on it. Please choose points that are far from each other. We suggest to use the 4 corners of the floor plan image. The coordinates of the 4 corners are:
    • [0; 0]
    • [0; max height]
    • [max width; max height]
    • [max width; 0]
  2. Upload the floor plan image inside the Accuware dashboard by following these instructions.
  3. Once the floor plan has been uploaded inside the Accuware dashboard:
    1. Select General > Floor plans.
    2. Click on the magnifier icon under the Action column for the floor plan of interest.
    3. Click on the Floor plan button in the top-left corner of Google Map.
    4. Zoom in as much as possible and move to the first corner of the floor plan image.
    5. Click on the first corner and take note of the lat/lng fields. E.g.
      • [0; 0] -> [45.610829, 9.351505]
    6. Click on the other 3 corners and take note of the lat/lng fields.
  4. You have now all what you need to create a [4 x 4] matrix where each row contains the correspondence between pixel x/pixel y and latitude/longitude: [pixel_x pixel_y latitude longitude].
  5. Compute the transformation matrix using least squares approach.

Once you have the transformation matrix you can apply it to any pair of latitude/longitude coordinates to obtain the corresponding pair of x/y pixel of your floor plan image.

 

please submit a support request using this form to get the Matlab code to make the computations described above along with a real example of usage of this method. You can implement the matrix multiplication, transpose and inverse operation by yourself (replicating the Matlab code in your favorite programming language) or you can use any library that does that already (you should have no problem finding one on the Web).