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