Zum Hauptinhalt gehen

enable location

Kommentare

4 Kommentare

  • Permanently deleted user

    Hi Matt,

    There are plenty of tutorials and examples online regarding Geolocation. It's really quite simple to implement.

    Once you have a working piece of Geolocation code, you will probably want to implement it in a command that can be invoked via the I Want To menu. To do so, you can create a custom library and module for the viewer, which is a good option if you are going to do any more custom development in the near future.

    The other option is to create the command implementation directly in your HTML page. For example, in Index.html you can add a command implementation underneath the "viewer.initialize()" method like so:

    viewer.commandRegistry.command("MyGeolocationCommand").register(viewer, function () {

    /* do a Geolocation operation and zoom to the point in the callback (hint: you may have to project it) */

    });

    Note that this is a convenient way to quickly prototype things without creating a new library, but is not recommended, as the HTML host pages will be overwritten when the viewer is upgraded.

    The SDK Samples portion of the HTML5 SDK package contains samples which demonstrate configuration of libraries and modules.

    FYI, Version 1.1 of the viewer has a Geolocation button in the UI by default.

    Hope this helps!

    - Jason

     

    0
  • Matt Taylor

    Jason - thanks.  I'll be downloading 1.1 shortly.  Hopefully that will get me rolling.

    0
  • Permanently deleted user

    Sorry, just to clarify: 1.1 is still under active development.

    0
  • Matt Taylor

    No problem.  I'm eagerly awaiting the release of 1.1

    Thanks again, Matt

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.