/*
 * Copyright 2017 iserge.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.cesiumjs.cs.core.projection;

import jsinterop.annotations.JsConstructor;
import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsType;
import org.cesiumjs.cs.core.Ellipsoid;

/**
 * @author Serge Silaev aka iSergio <s.serge.b@gmail.com>
 */
@JsType(isNative = true, namespace = "Cesium", name = "WebMercatorProjection")
public class WebMercatorProjection extends MapProjection {
    /**
     * The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857. This projection use
     * longitude and latitude expressed with the WGS84 and transforms them to Mercator using the spherical
     * (rather than ellipsoidal) equations.
     * @see GeographicProjection
     */
    @JsConstructor
    public WebMercatorProjection() {}

    /**
     * The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857. This projection use
     * longitude and latitude expressed with the WGS84 and transforms them to Mercator using the spherical
     * (rather than ellipsoidal) equations.
     * @param ellipsoid The ellipsoid.
     * @see GeographicProjection
     */
    @JsConstructor
    public WebMercatorProjection(Ellipsoid ellipsoid) {}

    /**
     * Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator angle in the range -PI to PI.
     * @param latitude The geodetic latitude in radians.
     * @return The Mercator angle.
     */
    @JsMethod
    public static native double geodeticLatitudeToMercatorAngle(double latitude);

    /**
     * Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude in the range -PI/2 to PI/2.
     * @param mercatorAngle The angle to convert.
     * @return The geodetic latitude in radians.
     */
    @JsMethod
    public static native double mercatorAngleToGeodeticLatitude(double mercatorAngle);
}

@@ -710,16 +710,57 @@
 Method;%0A
+import jsinterop.annotations.JsProperty;%0A
 import j
@@ -839,204 +839,1349 @@
 %0A * 
-@author Serge Silaev aka iSergio %3Cs.serge.b@gmail.com%3E%0A */%0A@JsType(isNative = true, namespace = %22Cesium%22, name = %22WebMercatorProjection%22)%0Apublic class WebMercatorProjection extends MapProjection %7B
+The map projection used by Google Maps, Bing Maps, and most of ArcGIS Online, EPSG:3857. This projection use%0A * longitude and latitude expressed with the WGS84 and transforms them to Mercator%0A * using the spherical (rather than ellipsoidal) equations.%0A *%0A * @author Serge Silaev aka iSergio %3Cs.serge.b@gmail.com%3E%0A */%0A@JsType(isNative = true, namespace = %22Cesium%22, name = %22WebMercatorProjection%22)%0Apublic class WebMercatorProjection extends MapProjection %7B%0A    /**%0A     * The maximum latitude (both North and South) supported by a Web Mercator (EPSG:3857) projection. Technically,%0A     * the Mercator projection is defined for any latitude up to (but not including) 90 degrees, but it makes sense%0A     * to cut it off sooner because it grows exponentially with increasing latitude. The logic behind this particular%0A     * cutoff value, which is the one used by Google Maps, Bing Maps, and Esri, is that it makes the projection square.%0A     * That is, the rectangle is equal in the X and Y directions.%0A     * The constant value is computed by calling: %7B@link WebMercatorProjection#mercatorAngleToGeodeticLatitude(Math.PI)%7D%0A     */%0A    @JsProperty(name = %22MaximumLatitude%22)%0A    public static native double MaximumLatitude();%0A    /**%0A     * Gets the Ellipsoid.%0A     */%0A    @JsProperty(name = %22ellipsoid%22)%0A    public native Ellipsoid ellipsoid();%0A
 %0A   

Add description for class