ParaWorld_Map
a central place per application for selling and buying tradable items.
Title |
a central place per application for selling and buying tradable items. |
Author(s) |
LiXizhi, CYF |
Date |
2008/1/21 |
File |
script/kids/3DMapSystemApp/API/paraworld.map.lua |
Description
file, world, map(obsoleted API)
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/API/ParaworldAPI.lua");
Member Functions
paraworld.map.UploadFileEx
create class
commonlib.setfield("paraworld.map", {});
file related
[[
涓婁紶鏂囦欢
姣忔涓婁紶鎿嶄綔鏈€澶氬彧鑳戒笂浼犱笉澶т簬1M鐨勬枃浠讹紝瀵逛簬澶т簬1M鐨勬枃浠讹紝闇€瑕佸垎鎴愬娆¤繘琛屼笂浼犮€?
瀵逛簬鍥惧儚鍥剧墖鐨勪笂浼狅紙鍗抽渶瑕佺敓鎴愮缉鐣ュ浘鐨勭敤鎴峰浘鍍忥級锛屾€绘枃浠跺ぇ灏忎笉鑳藉ぇ浜?M
鑻ヨ灏嗕竴涓枃浠跺垎鎴愬娆¤繘琛屼笂浼狅紝鍒欏繀椤绘彁渚泃otalByte鍙傛暟锛屽苟涓斿€煎繀椤诲ぇ浜?锛岀涓€娆′笂浼犳垚鍔熷悗浼氳繑鍥炰竴涓猣ilePath鑺傜偣锛堣嫢鍦ㄧ涓€娆′笂浼犳椂鎻愪緵浜唂ilePath鍙傛暟锛屽垯姝よ繑鍥炲€煎嵆鎻愪緵鐨刦ilePath鍙傛暟锛夛紝鍦ㄥ叾鍚庣殑姣忔涓婁紶涓兘蹇呴』鎻愪緵姝ゅ弬鏁般€?
鑻?fromByte = 0 && fromByte + 褰撳墠涓婁紶鏁版嵁鐨勪簩杩涘埗鏁扮粍鐨勯暱搴?=
totalByte锛屽垯浼氬皢姝ゆ涓婁紶鎿嶄綔瑙嗕负闈炲垎鎵逛笂浼狅紝鍗冲皢涓€涓枃浠朵竴娆℃€т笂浼犲畬鎴愩€?
msg = {
sessionKey : string (*) 鐢ㄦ埛鍑瘉
file : string (*) 鏂囦欢鐨凚ase64琛ㄧず褰㈠紡涓殑涓€娈垫垨鍏ㄩ儴锛岃嫢娌℃彁渚沠romByte鍜宼otalByte鍙傛暟锛屽垯涓哄叏閮?
fromByte : long 姝ゆ涓婁紶鐨勬暟鎹湪鏁翠釜鏂囦欢鐨勪簩杩涘埗鏁扮粍涓殑璧峰浣嶇疆锛屽綋鍒嗗娆′笂浼犱竴涓枃浠舵椂锛岃嫢闈炵涓€娆′笂浼狅紝鍒欏繀椤绘湁fromByte銆乼otalByte銆乫ilePath鍙傛暟
totalByte : long 涓婁紶鏂囦欢鐨勪簩杩涘埗鏁扮粍鐨勬€诲ぇ灏忥紝濡傛灉isPhoto==true锛屽垯totalByte涓嶅彲澶т簬1024*1024
extension : string 鏂囦欢鐨勫悗缂€鍚嶏紝濡傦紙.jpg .txt 绛夛紝鑻ユ湭鎻愪緵锛屽垯浠庡弬鏁癴ilePath涓幏鍙栵紝鑻xtension鍜宖ilePath閮芥病鏈夊€硷紝鍒欐病鏈夊悗缂€鍚嶏級
-
-
- isPhoto
- boolean 鏄惁鏄ご鍍忓浘鐗囷紝濡傛灉鏄紝鍒欎細鐢熸垚涓€涓師鍥撅紙鍘熷浘鏈€澶у搴﹁嫢澶т簬256锛屽垯浼氶€傚害缂╁皬锛夊拰涓€涓皬鍥撅紝榛樿鍊间负false
-
-
- filePath
- string 閫昏緫璺緞銆傝嫢鏈寚瀹氾紝鍒欎細榛樿涓?鈥渦pload/[褰撳墠鏃ユ湡]/[闅忔満鏂囦欢鍚峕[鍚庣紑鍚峕鈥?
overwrite : int 鑻ユ寚瀹氱殑鎸囧畾鐨勭墿鐞嗚矾寰勫凡瀛樺湪鏂囦欢锛屾槸鍚﹁鐩栧畠锛堝嵆鍒犻櫎鏃ф枃浠讹紝淇濆瓨鏂版枃浠讹級锛?锛氬惁锛?锛氭槸銆傚鏋滀负0锛屽綋鎸囧畾鐗╃悊璺緞涓凡瀛樺湪鏂囦欢鏃讹紝浼氳繑鍥為敊璇爜锛?10
}
msg = {
fileURL = string,
filePath = stirng,
fileSize = long 宸蹭笂浼犳枃浠剁殑澶у皬
[ fileURL_Small ] = string, 濡傛灉涓婁紶鐨勬槸澶村儚鍥剧墖锛屽垯杩斿洖鍊间腑鏈夋鏁版嵁
fileCrc32 = string
[ errorCode ] (int) 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍 锛堟洿澶欵rrorCode瑙乄IKI锛?
[ info ] = string
}
]]
we will break input file to 100KB blocks and send via web services.
local
MaxFileBlock = 1024*100;
paraworld.CreateRESTJsonWrapper("paraworld.map.UploadFile", "%FILE%/UploadFile.ashx",
function(self, msg, id, callbackFunc, callbackParams)
msg.request_timeout = msg.request_timeout or 60000
return paraworld.prepLoginRequried(self, msg, id, callbackFunc, callbackParams)
end);
it is similar to paraworld.map.UploadFile, except that it will automatically break a large file to blocks and send via web services.
- param msg : msg.src must be a valid file path, otherwise it will default to use paraworld.map.UploadFile
- param callbackFunc : the callback will be called each time a block of the file is successfully sent.
syntax
function paraworld.map.UploadFileEx(msg, id, callbackFunc, callbackParams)
parameters
msg |
msg.src must be a valid file path, otherwise it will default to use paraworld.map.UploadFile |
id |
|
callbackFunc |
|
callbackParams |
|
paraworld.map.OfficialMap
[[
鍒犻櫎涓€涓敤鎴锋枃浠?
msg = {
sessionKey = string (*) 鐢ㄦ埛鍑瘉
filePath = string (*) 闇€瑕佽鍒犻櫎鐨勬枃浠剁殑閫昏緫璺緞
}
msg = {
isSuccess = boolean 鍒犻櫎鏂囦欢鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int (褰撳彂鐢熷紓甯告椂浼氭湁姝よ妭鐐癸紝0锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍)
}
]]
paraworld.CreateRESTJsonWrapper("paraworld.file.DeleteFile", "%FILE%/Delete.ashx", paraworld.prepLoginRequried);
[[
渚濇嵁鏂囦欢ID鎴栨枃浠堕€昏緫鍦板潃鍙栧緱涓€涓敤鎴锋枃浠剁殑鏁版嵁
msg = {
sessionKey = string (*) 鐢ㄦ埛鍑瘉
[ filePath ] = string 鏂囦欢鐨勯€昏緫鍦板潃锛宖ilePath鍜宖ileID涓繀椤绘湁涓€涓湁鍊?
[ fileID ] = int 鏂囦欢ID锛宖ilePath鍜宖ileID涓繀椤绘湁涓€涓湁鍊?
[ ownerUID ] = string 鏂囦欢鎵€鏈夎€呯殑鐢ㄦ埛ID锛岃嫢涓嶄紶姝ゅ弬鏁帮紝鍒欐寚褰撳墠鐢ㄦ埛
}
msg = {
id锛堢敤鎴锋枃浠剁殑ID锛?
fileURL锛堟枃浠剁殑URL鍦板潃锛?
filePath锛堟枃浠剁殑鐗╃悊鍦板潃锛?
createDate锛堟枃浠剁殑鍒涘缓鏃堕棿锛?
uid锛堢敤鎴稩D锛?
[ errorCode ] = int (褰撳彂鐢熷紓甯告椂浼氭湁姝よ妭鐐癸紝0锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍)
}
]]
paraworld.CreateRESTJsonWrapper("paraworld.file.GetFile", "%FILE%/Get.ashx", paraworld.prepLoginRequried);
[[
淇敼鎸囧畾鏂囦欢鐨勬枃浠跺悕锛堥€昏緫鍦板潃锛?
msg = {
sessionKey = string (*) 鐢ㄦ埛鍑瘉
filePath = string (*) 闇€瑕佷慨鏀圭殑鏂囦欢鐨勯€昏緫鍦板潃
newFilePath = string (*) 鏂扮殑閫昏緫鍦板潃
}
msg = {
isSuccess = boolean 鍒犻櫎鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int (褰撳彂鐢熷紓甯告椂浼氭湁姝よ妭鐐癸紝0锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍)
}
]]
paraworld.CreateRESTJsonWrapper("paraworld.file.RenameFile", "%FILE%/Rename.ashx", paraworld.prepLoginRequried);
[[
鍒涘缓鐢ㄦ埛鏂囦欢銆?
msg = {
sessionKey = string (*) 鐢ㄦ埛鍑瘉
fileUrl = string (*) 璇ユ枃浠舵墍鍦ㄧ殑URL鍦板潃
filePath = string (*) 璇ユ枃浠舵墍鍦ㄧ殑閫昏緫鍦板潃
overwrite = int 鑻ユ寚瀹氱洰褰曚腑宸插瓨鍦ㄥ悓鍚嶇殑鏂囦欢锛屾槸鍚︾敤鏂扮殑鏂囦欢瑕嗙洊鏃х殑鏂囦欢銆?锛氬惁锛?锛氭槸銆傚鏋滀负鍚︼紝褰撳瓨鍦ㄥ悓鍚嶆枃浠舵椂锛屽垱寤烘枃浠剁殑鎿嶄綔灏嗕細澶辫触锛屽苟杩斿洖410閿欒
}
msg = {
isSuccess = boolean 鍒涘缓鏂囦欢鎿嶄綔鏄惁鎴愬姛
[ errorCode ] = int (褰撳彂鐢熷紓甯告椂浼氭湁姝よ妭鐐癸紝0锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍 409锛氳浣嶇疆宸插瓨鍦ㄥ悓鍚嶇殑鏂囦欢澶?410锛氳浣嶇疆宸插瓨鍦ㄥ悓鍚嶇殑鏂囦欢)
}
]]
paraworld.CreateRESTJsonWrapper("paraworld.file.CreateFile", "%FILE%/Create.ashx", paraworld.prepLoginRequried);
[[
渚濇嵁鎸囧畾鐨勯€昏緫鍦板潃鏌ユ壘鐢ㄦ埛鏂囦欢
msg = {
sessionKey = string (*) 鐢ㄦ埛鍑瘉
filePath = string (
) 闇€瑕佹煡鎵剧殑鏂囦欢鐨勯€昏緫鍦板潃锛屽彲甯﹂€氶厤绗︼紙?:鍗曚釜浠绘剰瀛楃;:澶氫釜浠绘剰瀛楃锛?
[ ownerUID ] = string 鏂囦欢鎵€鏈夎€呯殑鐢ㄦ埛ID锛岃嫢涓嶄紶姝ゅ弬鏁帮紝鍒欐寚褰撳墠鐢ㄦ埛
}
msg = {
files[list] = {
id锛堢敤鎴锋枃浠剁殑ID锛?
fileURL锛堟枃浠剁殑URL鍦板潃锛?
filePath锛堟枃浠剁殑鐗╃悊鍦板潃锛?
createDate锛堟枃浠剁殑鍒涘缓鏃堕棿锛?
uid锛堢敤鎴稩D锛?
}
[ errorCode ] = int (褰撳彂鐢熷紓甯告椂浼氭湁姝よ妭鐐癸紝0锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍)
}
]]
paraworld.CreateRESTJsonWrapper("paraworld.file.FindFile", "%FILE%/Find.ashx", paraworld.prepLoginRequried);
map related
Return a given official 2D map mcml. Official map is just map of a given admin user, using
ParaWorld.Map.getUserMap. It only returns an xml file path instead of the xml content.
syntax
function paraworld.map.OfficialMap()
paraworld.map.UserMap
Get/set the 2D map mcml of a given user
It only get/set an xml file path instead of the xml content.
syntax
function paraworld.map.UserMap()
paraworld.map.GetTilesInRegion
for tile manipulate----------------------------------------
[[
鍙栧緱涓€涓尯鍩熷唴鎵€鏈夌殑Tile
msg = {
"x" = double,
"y" = double,
"width" = double,
"height" = double
}
"resultCount" = int,
tiles = [list]
{
checkChangeL(long) 鏃堕棿鎴筹紝鐢ㄦ潵鍒ゆ柇鏁版嵁鏄惁宸叉湁鏀瑰彉
id(int) tileID
tileName (string) Tile鐨勫悕绉?
x(double) 鍧愭爣x
y(double) 鍧愭爣y
z(double) 鍧愭爣z
ownerUID(string) 鎵€鏈夎€呯敤鎴稩D
ownerUName(string) 鎵€鏈夎€呯敤鎴峰悕
useUID (string) 浣跨敤鑰呯敤鎴稩D
useUName (string) 浣跨敤鑰呯敤鎴峰悕
terrainStyle(int) 鍦熷湴鏍峰紡
tileType(int) 鍦熷湴绫诲瀷
models(string) 鍗佸叚鏍间腑鐨勬ā鍨婭D
texture (string) 鍦板舰绾圭悊
rotation (double) 鍦熷湴鏃嬭浆瑙掑害
}
[ errorCode ] (int) 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍
]]
paraworld.CreateRPCWrapper("paraworld.map.GetTilesInRegion", "http://map.paraengine.com/GetTilesInRegion.asmx");
syntax
function paraworld.map.GetTilesInRegion()
paraworld.map.AddTile
[[
鏂板涓€涓猅ile
msg = {
"sessionKey" = string (*)
"x" = double, (*)
"y" = double, (*)
"z" = double, (*)
"tileType" = int,
"terrainType" = int,
"texture" = string,
"rotation" = double,
"price" = decimal,
"price2" = decimal,
"price2StartTime" = datetime,
"price2EndTime" = datetime,
"rentPrice" = decimal,
"ranking" = int,
"logo" = string,
"models" = string,
"cityName" = string,
"ageGroup" = int
"allowEdit" = boolean
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
errorCode = int //閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍
info = [ optional ] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.AddTile()
paraworld.map.GetTileByID
[[
渚濇嵁Tile鐨処D鍙栧緱涓€涓猅ile鐨勪俊鎭?
if(operation = "get")
msg = {
"tileID" = int,
}
if operation = "get"
msg =
{
tileID(int) tileID
tileName (string) Tile鐨勫悕绉?
x(int) 鍧愭爣x
y(int) 鍧愭爣y
ownerUID(Guid,鐢╯tring浠f浛) 鎷ユ湁鑰匢D
ownerUName (鎷ユ湁鑰呯殑鐢ㄦ埛鍚?
useUID (string) 浣跨敤鑰呯殑鐢ㄦ埛ID
useUName(string) 浣跨敤鑰呯殑鐢ㄦ埛鍚?
terrainStyle(int) 鍦熷湴鏍峰紡
tileType(int) 鍦熷湴绫诲瀷
price(decimal) 浠锋牸
rentPrice(decimal) 鏈堢
rank(int) 绾у埆
models(string) 鍗佸叚鏍间腑鐨勬ā鍨婭D
cityName(string) 鍩庡競鍚嶇О
community(string) 绀惧洟
ageGroup(int) ESRP绾у埆锛?
[ errorCode ] (int) 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍
}
]]
TODO:uncomment this line
local tile_get_cache_policy =
Map3DSystem.localserver.CachePolicy:new("access plus 1 day");
local tile_get_cache_policy =
Map3DSystem.localserver.CachePolicy:new("access plus 0");
syntax
function paraworld.map.GetTileByID()
paraworld.map.BuyTile
[[
璐拱Tile
msg = {
"sessionKey" = string (*)
"id" = int,
"x" = double, (*)
"y" = double, (*)
"z" = double,
"terrainType" = int,
"texture" = string
}
msg =
{
isSuccess(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
tileID (int) //褰撳墠Tile鐨処D
errorCode = int //閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍
}
]]
syntax
function paraworld.map.BuyTile()
paraworld.map.GetMapMarkOfPage
for mark manipulate------------------------------
[[
鍙栧緱鏌愮敤鎴风殑鏌愮绫诲瀷鐨凪apMark涓煇涓€椤电殑鏁版嵁
if(operation = "get")
msg = {
ownerUserID = Guid,(*) (鐢╯tring浠f浛)
markType = int, (*) Mark绫诲瀷锛岃嫢涓?锛屽垯涓嶈
pageSize int, (*) 姣忛〉鐨勬暟閲?
pageIndex int, (*) 绗嚑椤碉紝浠?寮€濮嬭
}
if(operation = "get")
{
msg =
{
pageCount int, //鍏辨湁澶氬皯椤?
marks[list]
{
markID(int) 鏍囪ID
markType(int) 鏍囪绫诲瀷
markTitle(string) 鏍囪鍚嶇О
markStyle(int) 鏍囪鏍峰紡
x(double) x鍧愭爣
y(double) y鍧愭爣
isApproved(boolean) 鏄惁閫氳繃瀹℃牳
}
[ errorCode ] (int) 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍
}
}
]]
syntax
function paraworld.map.GetMapMarkOfPage()
paraworld.map.GetMapMarksInRegion
[[
杩斿洖鎸囧畾鍖哄煙鍐呮寚瀹氱被鍨?鎸囧畾鏁伴噺鐨刴ap mark,鎸夋爣璁扮瓑绾т粠楂樺埌搴曟帓搴?
msg = {
鈥渙peration鈥?=[鈥済et鈥漖,
鈥渪鈥?= double, (*) 璧峰鍧愭爣鐨刋鍧愭爣
鈥測鈥?= double, (*) 璧峰鍧愭爣鐨刌鍧愭爣
鈥渨idth鈥?double, (*) 寤鸿灏忎簬涓€涓狟lock鐨勫搴?
鈥渉eight鈥?double, (*) 寤鸿灏忎簬涓€涓狟lock鐨勯珮搴?
鈥渕arkType鈥? int,瑕佸彇寰楃殑鏍囪鐨勭被鍨嬶紝鑻ヤ负0,鍒欒繑鍥炴墍鏈夌被鍨嬬殑鏍囪
鈥渕arkNum鈥? int,瑕佸彇寰楃殑鏍囪鐨勬暟閲忥紝鑻ヤ负0,鍒欒繑鍥炲綋鍓嶅尯鍩熷唴鎵€鏈夋爣璁?
鈥渋sApproved鈥?= boolean,鏍囪鏄惁閫氳繃瀹℃牳锛岃嫢涓簄ull锛屽垯杩斿洖鎵€鏈?
}
if operation = "get"
msg = {
鈥渞esultCount鈥?= int锛岃繑鍥炵殑鏁版嵁閲?
"marks"[list]:
markID(int) 鏍囪ID
markType(int) 鏍囪绫诲瀷
markTitle(string) 鏍囪鍚嶇О
markStyle(int) 鏍囪鏍峰紡
x(double) x鍧愭爣
y(double) y鍧愭爣
isApproved(boolean) 鏄惁閫氳繃瀹℃牳
checkChangeL(long) 鏃堕棿鎴筹紝鐢ㄦ潵鍒ゆ柇鏁版嵁鏄惁宸叉敼鍙?
}
]]
syntax
function paraworld.map.GetMapMarksInRegion()
paraworld.map.AddMapMark
[[
鏂板涓€涓狹apMark
msg = {
"sessionKey" = string, (*)
"markType" = int, (*)
"markStyle" = int, (*)
"markTitle" = string, (*)
"startTime" = dateTime, (*)
"endTime" = dateTime,
"x" = double, (*)
"y" = double, (*)
"cityName" = string,
"rank" = int, (*)
"logo" = string,
"signature" = string,
"desc" = string,
"ageGroup" = int, (*)
"isApproved" = boolean,
"version" = string,
"ownerUserID" = GUID锛岀敤string浠f浛,
"allowEdit" = boolean
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
info = [optional] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.AddMapMark()
paraworld.map.UpdateMapMark
[[
鏇存柊涓€涓狹apMark
msg = {
"sessionKey" = string, (*)
"markID" = int, (*)
"markType" = int,
"markStyle" = int,
"markTitle" = string,
"startTime" = dateTime,
"endTime" = dateTime,
"x" = double,
"y" = double,
"cityName" = string,
"rank" = int,
"logo" = string,
"signature" = string,
"desc" = string,
"ageGroup" = int,
"isApproved" = boolean,
"version" = string,
"ownerUserID" = GUID锛岀敤string浠f浛,
"clickCnt" = int,
"worldID" = int,
"allowEdit" = boolean,
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
info = [ optional ] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.UpdateMapMark()
paraworld.map.GetMapMarkByID
[[
渚濇嵁ID鍙栧緱涓€涓狹apMark
msg = {
"markID" = int (*)
}
msg =
{
markID(int) 鏍囪ID
markType(int) 鏍囪绫诲瀷
markTitle(string) 鏍囪鍚嶇О
markStyle(int) 鏍囪鏍峰紡
startTime(dateTime) 鏍囪鎸佺画鏃堕棿
endTime(dateTime) 鏍囪缁撴潫鏃堕棿
x(double) x鍧愭爣
y(double) y鍧愭爣
cityName(string) 鎵€灞炲煄甯傚悕绉?
rank(int) 鏍囪绛夌骇
logo(String) 鐜╁澶村儚
signature(string) 鐜╁绛惧悕
desc(string) 璇︾粏鎻忚堪淇℃伅
ageGroup(int) ESRP绾у埆
worldID(int) 鏍囪鎵€灞炵殑涓栫晫鐨処D
isApproved(boolean) 鏄惁閫氳繃瀹℃牳
version(string) 鏀寔鐨勫紩鎿庣増鏈?
clickCnt(int) 鐐瑰嚮鏁?
ownerUserID(Guid,鐢╯tring浠f浛) 鎵€鏈夎€匢D
url(string) 鑻arkType涓?(鐜╁鏍囪),鍒欎负鐜╁鐨勪笘鐣屽湴鍧€; 鑻arkType涓?(浜嬩欢鏍囪),鍒欎负浜嬩欢鐨勫湴鍧€;鑻arkType涓?(鍩庡競鏍囪),鍒欐棤鎰忎箟;鑻arkType涓?(骞垮憡鏍囪),鍒欎唬琛ㄥ箍鍛婄殑涓€涓秴閾炬帴
}
]]
syntax
function paraworld.map.GetMapMarkByID()
paraworld.map.RemoveMapMark
[[
鍒犻櫎涓€涓狹apMark
msg = {
"sessionKey" = string, (*)
"markID" = int (*)
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
info = [optional] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.RemoveMapMark()
paraworld.map.SearchMapMark
[[
杩斿洖绗﹀悎鎴栧寘鍚叧閿瓧鐨勭N椤电殑map mark, 鎸夋爣璁扮瓑绾т粠楂樺埌搴曟帓搴?
msg = {
"keywords" = string, (*)
"type" = string,瑕佹悳绱㈢殑鏍囪鐨勭被鍨嬶紙MarkTilte锛孌esc锛夛紝榛樿涓衡€淢arkTitle鈥?
"pageIndex" = int, 绗嚑椤电殑鏁版嵁锛岄粯璁や负1
"pageNum" = int, 姣忛〉澶氬皯鏉℃暟鎹紝榛樿涓?0
"isApproved" = boolean 鏄惁缁忚繃瀹℃牳锛岄粯璁や负false
}
if operation = "get"
msg = {
"resultCount" = int,
"totalResult" = int,
"marks"[list]:
markID(int) 鏍囪ID
markType(int) 鏍囪绫诲瀷
markTitle(string) 鏍囪鍚嶇О
markStyle(int) 鏍囪鏍峰紡
x(double) x鍧愭爣
y(double) y鍧愭爣
isApproved(boolean) 鏄惁閫氳繃瀹℃牳
checkChangeL(double) 鏃堕棿鎴筹紝鐢ㄦ潵鍒ゆ柇鏁版嵁鏄惁宸叉敼鍙?
[info] 璇存槑淇℃伅銆傝嫢涓嶈兘鎴愬姛鎼滅储鏁版嵁锛屾鑺傜偣鎻忚堪鍘熷洜銆傝嫢鑳芥垚鍔熸悳绱紝鍒欎笉浼氭湁姝よ妭鐐?
}
]]
syntax
function paraworld.map.SearchMapMark()
paraworld.map.GetMapModelByIDs
for model manipulate-------------------------------
[[
渚濇嵁涓€缁凪apModel鐨処D鍙栧嚭杩欎簺MapModel鐨勭浉鍏充俊鎭?
msg = {
鈥渙peration鈥?=[鈥済et鈥漖,
"modelIDs"[list]
{
........................
}
}
if operation = 鈥済et鈥?
msg[list] =
{
modelID(int) 妯″瀷ID
modelType(int) 妯″瀷绫诲瀷
picURL(string) MODEL瀵瑰簲鐨勫浘鐗囩殑URL,
version(string) 鏀寔鐨勫紩鎿庣増鏈?
}
]]
syntax
function paraworld.map.GetMapModelByIDs()
paraworld.map.GetMapModelOfPage
[[
鍙栧緱Model鐨勬煇涓€椤电殑鏁版嵁
if(operation = "get")
msg =
{
operation = "get",(*)
pageNum = int,(*) 姣忛〉鐨勬暟鎹噺
pageIndex = int,(*) 绗嚑椤?
}
if(operation = "get")
msg =
{
pageCount int 鍏辨湁澶氬皯椤?
models[list] Model闆嗗悎
{
modelID = int,
modelType = int,
picURL = string,
manufacturerType = int,
manufacturerID = Guid(鐢╯tring浠f浛),
manufacturerName = string,
price = decimal,
price2 = decimal,
price2StartTime datetime,
price2EndTime datetime,
addDate datetime,
ownerUserID = GUID,鐢╯tring浠f浛
ownerUserName = string,
version = string,
modelPath = string,
texturePath = string,
package = string,
allowEdit = boolean,
userData1 = string 杩欎釜Model鏈夊摢鍑犵鏈濆悜锛?锛氫笢锛?锛氫笢鍗楋紱2锛氬崡锛?.....姣忕鏂瑰悜浠ヨ嫳鏂囬€楀彿锛?锛夊垎闅?
}
}
]]
syntax
function paraworld.map.GetMapModelOfPage()
paraworld.map.AddModel
[[
鏂板涓€涓狹odel
msg ={
sessionKey = string, (*)
modelType = int, (*)
picURL = string, (*)
manufacturerType = int, (*) 1:ParaEngine, 2: 鐜╁ 3:绗笁鏂圭敓浜у晢
manufacturerID = Guid锛堢敤string浠f浛锛?
manufacturerName = string,
price = decimal,
price2 = decimal,
price2StartTime datetime,
price2EndTime datetime,
ownerUserID = GUID,鐢╯tring浠f浛
ownerUserName = string,
version = string,
modelPath = string,
texturePath = string,
package = string,
allowEdit = boolean,
directions = string 璇ユā鍨嬬殑鏈濆悜闆嗗悎锛?涓轰笢锛?涓轰笢鍗楋紝2涓哄崡锛?涓鸿タ鍗楋紝浠ユ绫绘帹銆傛瘡涓湞鍚戜箣闂翠互鑻辨枃閫楀彿鈥?鈥濆垎闅?
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
info = [ optional ] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.AddModel()
paraworld.map.GetModelByID
[[
渚濅富閿幏寰椾竴涓狹odel鐨勪俊鎭?
msg = {
"modelID" = int (*)
"isSimple" = boolean 鑻ヨ杩斿洖绮剧畝妯″紡鐨勬暟鎹紝鍒欎负True锛岃嫢瑕佽繑鍥炲叏閮ㄥ瓧娈垫暟鎹紝鍒欎负False銆傞粯璁ゅ€间负False
}
msg =
{
modelID = int,
modelType = int,
picURL = string,
texturePath = string,
package = string,
version = string, //姝ゅ瓧娈靛強浠ヤ笂瀛楁涓虹簿绠€妯″紡鐨勬暟鎹?
manufacturerType = int,
manufacturerID = Guid锛堢敤string浠f浛锛?
manufacturerName = string,
price = decimal,
price2 = decimal,
price2StartTime datetime,
price2EndTime datetime,
addDate datetime,
ownerUserID = GUID,鐢╯tring浠f浛
ownerUserName = string,
modelPath = string,
allowEdit = boolean,
directions = string 璇ユā鍨嬬殑鏈濆悜闆嗗悎锛?涓轰笢锛?涓轰笢鍗楋紝2涓哄崡锛?涓鸿タ鍗楋紝浠ユ绫绘帹銆傛瘡涓湞鍚戜箣闂翠互鑻辨枃閫楀彿鈥?鈥濆垎闅?
[info] = string 鍏充簬姝ゆ鎿嶄綔鐨勮鏄庝俊鎭紝姣斿锛氬紓甯镐俊鎭瓑锛岃嫢鑳芥甯稿彇鍑烘暟鎹紝鍒欎笉浼氭湁姝ゅ瓧娈?
[ errorCode ] (int) 閿欒鐮併€?锛氭棤寮傚父 500锛氭湭鐭ラ敊璇? 499锛氭彁渚涚殑鏁版嵁涓嶅畬鏁? 498锛氶潪娉曠殑璁块棶 497锛氭暟鎹笉瀛樺湪鎴栧凡琚垹闄? 496锛氭湭鐧诲綍
}
]]
syntax
function paraworld.map.GetModelByID()
paraworld.map.UpdateModel
[[
淇敼涓€涓狹odel
msg = {
sessionKey = string, (*)
modelID = int, (*)
modelType = int,
picURL = string,
manufacturerType = int,
manufacturerID = Guid(鐢╯tring浠f浛),
manufacturerName = string,
price = decimal,
price2 = decimal,
price2StartTime datetime,
price2EndTime datetime,
ownerUserID = GUID,鐢╯tring浠f浛
ownerUserName = string,
version = string,
modelPath = string,
texturePath = string,
package = string,
allowEdit = boolean,
directions = string 璇ユā鍨嬬殑鏈濆悜闆嗗悎锛?涓轰笢锛?涓轰笢鍗楋紝2涓哄崡锛?涓鸿タ鍗楋紝浠ユ绫绘帹銆傛瘡涓湞鍚戜箣闂翠互鑻辨枃閫楀彿鈥?鈥濆垎闅?
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
[info] = [ optional ] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.UpdateModel()
paraworld.map.RemoveModel
[[
鍒犻櫎涓€涓狹odel
msg = {
"sessionKey" = string (*)
"modelID" = int (*)
}
msg =
{
isSucceed(boolean) 鎿嶄綔鏄惁鎴愬姛瀹屾垚
info = [ optional ] 娉ㄩ噴銆佽鏄庝俊鎭?
}
]]
syntax
function paraworld.map.RemoveModel()