Skip to content

Commit

Permalink
refactor(geo-utils.js): change variable and method names
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Jul 20, 2021
1 parent 0b41af2 commit 883e66c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/support/geo-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ const geoUtils = {
let bottomLeftVortice = coordinates[3]

let topAndBottomParallel = (topLeftVortice[1] - bottomLeftVortice[1]) === (topRightVortice[1] - bottomRightVortice[1])
let trightAndLeftParallel = (topLeftVortice[0] - bottomLeftVortice[0]) === (topRightVortice[0] - bottomRightVortice[0])
let rightAndLeftParallel = (topLeftVortice[0] - bottomLeftVortice[0]) === (topRightVortice[0] - bottomRightVortice[0])

if (topAndBottomParallel && trightAndLeftParallel) {
if (topAndBottomParallel && rightAndLeftParallel) {
return true
}
return false
Expand Down Expand Up @@ -171,7 +171,7 @@ const geoUtils = {
* Get marker coordinates
* @param {*} marker
*/
getMarkerCordinates(marker) {
getMarkerCoordinates(marker) {
const markerCoordinates = lodash.get(marker, 'data.geometry.coordinates')
return markerCoordinates
},
Expand All @@ -194,13 +194,8 @@ const geoUtils = {
return Leaflet.GeometryUtil.readableArea(area, unit)
},





/**
* Build a marker icon based on the color specified
* Expecting marker PNGs in 180x230 resolution
* Build an HTML marker icon based on parameters
* @param {String} color
* @returns {Object} markerIcon
*/
Expand Down

0 comments on commit 883e66c

Please sign in to comment.