|
|
|
@ -2,7 +2,7 @@ import {
|
|
|
|
|
GEO_LOCATION_SUCCESS, GEO_LOCATION_FAILURE, |
|
|
|
|
GEO_MARKER_ADD, GEO_MARKER_RESET, GEO_MARKER_UPDATE, |
|
|
|
|
GEO_POLYGON_ADD, GEO_POLYGON_RESET, GEO_POLYGON_UPDATE, |
|
|
|
|
GEO_MAPCENTER_UPDATE, |
|
|
|
|
GEO_MAPCENTER_UPDATE, GEO_LASTCENTER_UPDATE, |
|
|
|
|
GEO_DRAGMARKER_CHANGE, GEO_DRAGMARKER_DISABLE, GEO_DRAGMARKER_ENABLE, |
|
|
|
|
} from '../constants/ActionTypes' |
|
|
|
|
|
|
|
|
@ -12,6 +12,7 @@ const initialState = {
|
|
|
|
|
message: '', |
|
|
|
|
polygons: [], |
|
|
|
|
markers: [], |
|
|
|
|
lastCenter: [13.84626739, 100.538], |
|
|
|
|
mapCenter: [13.84626739, 100.538], |
|
|
|
|
draggableMarker: false, |
|
|
|
|
draggableMarkerLatlon: [13.8462745, 100.5382592], |
|
|
|
@ -35,6 +36,11 @@ const geo = (state = initialState, action) => {
|
|
|
|
|
...state, |
|
|
|
|
draggableMarkerLatlon: action.payload, |
|
|
|
|
} |
|
|
|
|
case GEO_LASTCENTER_UPDATE: |
|
|
|
|
return { |
|
|
|
|
...state, |
|
|
|
|
lastCenter: action.payload, |
|
|
|
|
} |
|
|
|
|
case GEO_MAPCENTER_UPDATE: |
|
|
|
|
return { |
|
|
|
|
...state, |
|
|
|
|