PilotGaea 2D O'view
    正在準備搜尋索引...

    類別 Projection

    Projection definition class. One of these is created for each projection supported in the application and stored in the ol.proj namespace. You can use these in applications, but this is not required, as API params and options use ol.ProjectionLike which means the simple string code will suffice.

    You can use ol.proj.get to retrieve the object for a particular projection.

    The library includes definitions for EPSG:4326 and EPSG:3857, together with the following aliases:

    If you use proj4js, aliases can be added using proj4.defs(); see documentation. To set an alternative namespace for proj4, use ol.proj.setProj4.

    Projection options.

    stable

    索引

    方法

    • Get the code for this projection, e.g. 'EPSG:4326'.

      回傳 string

      Code.

      stable

    • Get the validity extent for this projection.

      回傳 Extent

      Extent.

      stable

    • Get the units of this projection.

      回傳 ol.proj.Units

      Units.

      stable

    • Get the amount of meters per unit of this projection. If the projection is not configured with metersPerUnit or a units identifier, the return is undefined.

      回傳 number

      Meters.

      stable

    • Get the world extent for this projection.

      回傳 Extent

      Extent.

    • Is this projection a global projection which spans the whole world?

      回傳 boolean

      Whether the projection is global.

      stable

    • Set if the projection is a global projection which spans the whole world

      參數

      • global: boolean

        Whether the projection is global.

      回傳 void

      stable

    • Set the validity extent for this projection.

      參數

      回傳 void

      stable

    • Set the world extent for this projection.

      參數

      • worldExtent: Extent

        World extent [minlon, minlat, maxlon, maxlat].

      回傳 void

    • Set the getPointResolution function for this projection.

      參數

      • func: (resolution: number, coords: Coordinate) => number

        Function

      回傳 void

    • Get the resolution of the point in degrees or distance units. For projections with degrees as the unit this will simply return the provided resolution. The default for other projections is to estimate the point resolution by transforming the 'point' pixel to EPSG:4326, measuring its width and height on the normal sphere, and taking the average of the width and height. An alternative implementation may be given when constructing a projection. For many local projections, such a custom function will return the resolution unchanged.

      參數

      • resolution: number

        Resolution in projection units.

      • point: Coordinate

        Point.

      回傳 number

      Point resolution in projection units.

    構造函數

    • 參數

      回傳 Projection

      Projection definition class. One of these is created for each projection supported in the application and stored in the ol.proj namespace. You can use these in applications, but this is not required, as API params and options use ol.ProjectionLike which means the simple string code will suffice.

      You can use ol.proj.get to retrieve the object for a particular projection.

      The library includes definitions for EPSG:4326 and EPSG:3857, together with the following aliases:

      If you use proj4js, aliases can be added using proj4.defs(); see documentation. To set an alternative namespace for proj4, use ol.proj.setProj4.

      stable