Exemplo n.º 1
0
        protected void setModelCoordinates(OrbitViewInputSupport.OrbitViewState modelCoords)
        {
            if (modelCoords != null)
            {
                if (modelCoords.getCenterPosition() != null)
                {
                    this.center = normalizedCenterPosition(modelCoords.getCenterPosition());
                    this.center = this.getOrbitViewLimits().limitCenterPosition(this, this.center);
                }
                if (modelCoords.getHeading() != null)
                {
                    this.heading = normalizedHeading(modelCoords.getHeading());
                    this.heading = this.getOrbitViewLimits().limitHeading(this, this.heading);
                }
                if (modelCoords.getPitch() != null)
                {
                    this.pitch = normalizedPitch(modelCoords.getPitch());
                    this.pitch = this.getOrbitViewLimits().limitPitch(this, this.pitch);
                }

                this.zoom = modelCoords.getZoom();
                this.zoom = this.getOrbitViewLimits().limitZoom(this, this.zoom);

                this.updateModelViewStateID();
            }
        }
Exemplo n.º 2
0
 protected bool validateModelCoordinates(OrbitViewInputSupport.OrbitViewState modelCoords)
 {
     return(modelCoords != null &&
            modelCoords.getCenterPosition() != null &&
            modelCoords.getCenterPosition().getLatitude().degrees >= -90 &&
            modelCoords.getCenterPosition().getLatitude().degrees <= 90 &&
            modelCoords.getHeading() != null &&
            modelCoords.getPitch() != null &&
            modelCoords.getPitch().degrees >= 0 &&
            modelCoords.getPitch().degrees <= 90 &&
            modelCoords.getZoom() >= 0);
 }