Emapsdk wrapper for meepshop
Install
yarn add https://github.com/meepshop/emapsdk-wrapper.git
Usage of apis
const ew = apisconst cities = ewconsole// [ '台北市', '基隆市', '新北市', '桃園市', '新竹市', '新竹縣', '苗栗縣', '台中市', '彰化縣', '南投縣', '雲林縣', '嘉義市', '嘉義縣', '台南市', '高雄市', '屏東縣', '宜蘭縣', '花蓮縣', '台東縣', '澎湖縣', '連江縣', '金門縣' ]ewewewewew
Usage of mock
All usage is the same as apis, but this mock is only work at 台北市信義區永吉路, others will return empty array. It will always return the same value which is pre-defined in this module. This mock is useful if you do not want to really fetch the data from emapsdk.
const ew = mockconst cities = ewconsoleewewew
Input Params and Returns Type
Please see schema for more information.
- townGeoSchema for getTowns(city) return value
- roadNameSchema for getRoads(city, town) return value
- storeGeoSchema for getStores(searchStoreParams) return value
- searchStoreParamsSchema for getStores(searchStoreParams) input params
ErrorType
const ew = mockconst ewErrorType = errorTypeew
More Example
For more example, please see the test