fix(geo-map): fix west longitude and south latitude not parsed correctly

Signed-off-by: BoHong Li <raccoon@hackmd.io>
This commit is contained in:
BoHong Li 2020-03-02 14:07:53 +08:00
parent 66ec25dddb
commit 5b5d0417f5
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
1 changed files with 1 additions and 1 deletions

View File

@ -450,7 +450,7 @@ export function finishView (view) {
try {
let position, zoom
if (content.match(/^[\d.,\s]+$/)) {
if (content.match(/^[-\d.,\s]+$/)) {
const [lng, lat, zoo] = content.split(',').map(parseFloat)
zoom = zoo
position = [lat, lng]