MCPcopy Create free account
hub / github.com/CoderOpen/waimai / formatLocation

Function formatLocation

front/common/util.js:18–31  ·  view source on GitHub ↗
(longitude, latitude)

Source from the content-addressed store, hash-verified

16}
17
18function formatLocation(longitude, latitude) {
19 if (typeof longitude === 'string' && typeof latitude === 'string') {
20 longitude = parseFloat(longitude)
21 latitude = parseFloat(latitude)
22 }
23
24 longitude = longitude.toFixed(2)
25 latitude = latitude.toFixed(2)
26
27 return {
28 longitude: longitude.toString().split('.'),
29 latitude: latitude.toString().split('.')
30 }
31}
32var dateUtils = {
33 UNITS: {
34 '年': 31557600000,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected