Work with rectangular map areas (polygons) defined by two corners and an optional rotation.
This module provides a simplified interface for creating and using rectangular areas on a map. It wraps the internal polygon logic and exposes a clean public API.
Create a rectangular area from a top-left and bottom-right coordinate, with a rotation in degrees (clockwise, around the center of the rectangle).
import Maps.Area
import Maps.Geo exposing (latLng)
myArea =
Maps.Area.create
(latLng 52.52 13.38)
-- top-left
(latLng 52.51 13.39)
-- bottom-right
30
-- rotation in degrees
Represents a rectangular polygonal area on the map. This type is opaque and should be created using the
createfunction.