Login
Developer FAQ
3. API Usage FAQ_HOME
3.1 Which version of the API should I target?
3.2 How do I check that the API was successfully retrieved?
3.3 How do I hide the GermaniumWeb plugin?
3.4 When I open a placemark callout that contains an image, the callout is too small and has scrollbars. Can I make the callout properly sized?
3.5 Why does the Eye's Z-orientation rotate back to 0 after I set it to something else?

3.1 Which version of the API should I target? top
  • We recommend targeting the newest version of the API at the time you start developing. Fix the targeted version by specifying it in your HTML, for example:
    <script src="http://api.germanium3d.com/?v=1.0&key=999"></script>
    If you do not fix the version, your web page will always use the newest API version. This will force visitors to your web page to upgrade their plugin more often than necessary.
3.2 How do I check that the API was successfully retrieved? top
  • You may insert the following code snippet prior to calling Germanium.CreateInstance():
    try
    {
    void( Germanium ); // If GermaniumWeb API was successfully targetted, 'Germanium' will exist.
    }
    catch (e)
    {
    alert("
    GermaniumWeb API retrieval failed. Error message: [" + e + "]");
    return;
    }
  • If the API retrieval fails (e.g. due to network failure), an alert box will pop up on screen.
3.3 How do I hide the GermaniumWeb plugin? top
  • For Internet Explorer 6, you can do this by
    object.style.display = "none"
  • For other browsers, you can do so by
    object.style.visible = "hidden"
object is the HTML element that you specified when calling the function Germanium.CreateInstance.
3.4 When I open a placemark callout that contains an image, the callout is too small and has scrollbars. Can I make the callout properly sized? top
Yes, you can. You do this by explicitly specifying the width and height of the image.
<img ... style="width: Wpx; height: Hpx">
W and H are respectively the width and height of the image in pixels.

When the width and height are not specified, the browser underestimates the size of the image and hence results in a callout which is too small.

3.5 Why does the Eye's Z-orientation rotate back to 0 after I set it to something else? top
  • This is a feature. It keeps the user from being disoriented.