Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Using Google Maps in Abiquo

Excerpt

Abiquo uses Google Maps for the map display, which requires the server to have Internet access. From Abiquo 3.2.2 onwards, the map view is optional and statistics can be shown instead. In new installations, the map view is the default for Infrastructure view. In upgraded installations, to enable the map view, set the appropriate property in the client-config.json file.

From 3.0 onwards, Abiquo uses the Google Maps Javascript API v3 to plot the datacenter locations on the map. Abiquo 2.0 used API v2, so , and you cannot use an old key with Abiquo 3.0. You should obtain a new key for Abiquo 3.0 onwardsthe v2 API. . However, the API will function without a key up to a certain number of requests.

From Abiquo 3.2.2 onwards, the The Google maps API key should be added to the client-config.json file as described below.

...

You should add a simple server key for accessing the Google Maps Javascript API v3To obtain the key, follow the instructions at https://developers.google.com/maps/documentation/javascript/tutorial#api_key:

Adding the Google Maps API Key to Abiquo 3.2 or 3.2.1 

Now you will add the API key you copied above to the Abiquo Server.

  1. Log in to the Abiquo Server as root
  2. Change to the UI directory

    Code Block
    cd /var/www/html/ui
  3. Back up the index.html file

    Code Block
    cp index.html ~/index.html.backup
  4. Edit the index.html file and add the Google Maps key. For example

    Code Block
    <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key=AIzPSyDryNhzxEdtfDnGQBKDAtzFqRhjeTUEh_g&sensor=false&language=en"></script>
  5. Add the Google Maps key. For example:

    Code Block
    "client.google.maps.key": "asdasdDryNhzxEdtfDnGQBKDAtzFqRhjeTUEh_g"

    Image Removed
     

  6. Reload Abiquo in your browser, which will log you out. 
     
  7. Confirm the installation by using "View Source" on the Abiquo login page. You should see the API key.
  8. When you log in to Abiquo, you should see the arrow marking the location of your datacenter.

Adding the Google Maps API Key to Abiquo 3.2.2 and above

Now you will add the API key you copied above to the Abiquo Server.

  1. Log in to the Abiquo Server as root
  2. Change to the UI directory

    Code Block
    cd /var/www/html/ui/config
  3. Back up the client-config.json file, for example

    Code Block
    cp client-config.json ~/client-config.json.backup
  4. If necessary, edit client-config.json to enable Google Maps  

    Code Block
    "client.google.maps.enabled": true, 


  5. Add the Google Maps key. For example:

    Code Block
    "client.google.maps.key": "asdasdDryNhzxEdtfDnGQBKDAtzFqRhjeTUEh_g"

     

  6. Reload Abiquo in your browser, which will log you out. 
     
  7. Confirm the installation by using "View Source" on the Abiquo login page. You should see the API key.

  8. When you log in to Abiquo, you should see the arrow marking the location of your datacenter.

Troubleshooting

  • Improve Datacenter Location Details

...

  • If your datacenter is not correctly plotted, try adding more details of the location. For example, if your datacenter is located in Barcelona, Venezuela and you enter Barcelona, the map will show the location as Barcelona in Spain. In this case, you would enter "Barcelona, Venezuela" in the Datacenter location for a correct visualization.
  • Google Maps Usage Limits

...