{"id":61,"date":"2009-03-14T21:09:00","date_gmt":"2009-03-14T21:09:00","guid":{"rendered":"http:\/\/blog.newnaw.com\/?p=61"},"modified":"2009-03-14T21:09:00","modified_gmt":"2009-03-14T21:09:00","slug":"%e5%9c%a8arcgis-server%e4%b8%ad%e8%b0%83%e7%94%a8esri%e8%87%aa%e5%b8%a6%e7%ac%a6%e5%8f%b7%e5%ba%93%e7%9a%84%e4%b8%80%e4%b8%aa%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/blog.newnaw.com\/?p=61","title":{"rendered":"\u5728ArcGIS Server\u4e2d\u8c03\u7528ESRI\u81ea\u5e26\u7b26\u53f7\u5e93\u7684\u4e00\u4e2a\u95ee\u9898"},"content":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u5728ArcGIS Engine\u4e2d\uff0c\u5982\u679c\u8981\u8c03\u7528ESRI\u81ea\u5e26\u7b26\u53f7\u5e93\u4e2d\u7684\u4e00\u4e2a\u7b26\u53f7\uff0c\u6bd4\u5982\u56fe\u4e2d\u7684ColorRamp\uff1a<\/p>\n<div style=\"text-align: center;\"><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/4.bp.blogspot.com\/_DD8LUY9p6iU\/SbutTrQUbQI\/AAAAAAAAADw\/vj5q7GhVCSs\/s1600-h\/stylemanager.png\" target=\"_blank\"><img decoding=\"async\" style=\"cursor: pointer; width: 400px; height: 307px;\" src=\"http:\/\/4.bp.blogspot.com\/_DD8LUY9p6iU\/SbutTrQUbQI\/AAAAAAAAADw\/vj5q7GhVCSs\/s400\/stylemanager.png\" alt=\"\" id=\"BLOGGER_PHOTO_ID_5313030738953923842\" border=\"0\" \/><\/a><\/p>\n<div style=\"text-align: left;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u53ef\u4ee5\u5229\u7528\u4ee5\u4e0b\u4ee3\u7801\u6765\u5f97\u5230\uff1a<br \/> <span style=\"color: rgb(0, 0, 153);\">IStyleGallery pSG=new ServerStyleGalleryClass();<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">           pSG.ImportStyle(&#8220;ESRI.ServerStyle&#8221;);<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">           IEnumStyleGalleryItem pESGI = pSG.get_Items(&#8220;Color Ramps&#8221;, null, null);<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">           IStyleGalleryItem pSGI=pESGI.Next();<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">while(pSGI!=null)<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">{<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">if(&#8220;Pastels&#8221;==pSGI.Name)\/\/pastels\u662f\u8be5colorramp\u7684\u540d\u5b57<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">break;<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">pSGI=pESGI.Next();<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">}<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">IColorRamp pColorRamp=pSGI.Item as IColorRamp;<\/span><br \/><span style=\"color: rgb(0, 0, 153);\">&#8230;<\/span><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u4f46\u5728AGS\u4e2d\u53d1\u73b0\uff0c\u6267\u884c\u5b8cIStyleGalleryItem pSGI=PESGI.Next();\u540e\uff0cpSGI\u59cb\u7ec8\u4e3anull\uff0c\u4f46pSG.ClassCount\u5374\u4e3a22\uff0c\u8868\u660e\u5df2\u7ecf\u5bfc\u5165\u4e86\u7b26\u53f7\u5e93\u6587\u4ef6\uff0c\u539f\u56e0\u540e\u9762\u3002\u4f46pSG.get_Items()\u65b9\u6cd5\u6267\u884c\u65f6\u4e5f\u4e0d\u62a5\u9519\uff0c\u4e14\u5728engine\u4e0b\u90fd\u6ca1\u6709\u95ee\u9898\u2026\u2026\u6700\u540e\u53d1\u73b0\uff0c\u5728pSG.get_Items()\u4e4b\u540e\uff0cpESGI.Next();\u4e4b\u524d\uff0c\u63d2\u5165\u4e00\u53e5pESGI.Reset()\u95ee\u9898\u5c31\u89e3\u51b3\u4e86\uff0c\u6bd4\u8f83\u65e0\u5398\u5934\u3002<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u5728ArcGIS Engine\u4e2d\uff0c\u5982\u679c\u8981\u8c03\u7528ESRI\u81ea\u5e26\u7b26\u53f7\u5e93\u4e2d\u7684\u4e00\u4e2a\u7b26\u53f7\uff0c\u6bd4\u5982\u56fe\u4e2d\u7684ColorRamp\uff1a &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u53ef\u4ee5\u5229\u7528\u4ee5\u4e0b\u4ee3\u7801\u6765\u5f97\u5230\uff1a IStyleGallery pSG=new ServerStyleGalleryClass(); pSG.ImportStyle(&#8220;ESRI.ServerStyle&#8221;); IEnumStyleGalleryItem pESGI = pSG.get_Items(&#8220;Color Ramps&#8221;, null, null); IStyleGalleryItem pSGI=pESGI.Next();while(pSGI!=null){if(&#8220;Pastels&#8221;==pSGI.Name)\/\/pastels\u662f\u8be5colorramp\u7684\u540d\u5b57break;pSGI=pESGI.Next();}IColorRamp pColorRamp=pSGI.Item as IColorRamp;&#8230;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u4f46\u5728AGS\u4e2d\u53d1\u73b0\uff0c\u6267\u884c\u5b8cIStyleGalleryItem pSGI=PESGI.Next();\u540e\uff0cpSGI\u59cb\u7ec8\u4e3anull\uff0c\u4f46pSG.ClassCount\u5374\u4e3a22\uff0c\u8868\u660e\u5df2\u7ecf\u5bfc\u5165\u4e86\u7b26\u53f7\u5e93\u6587\u4ef6\uff0c\u539f\u56e0\u540e\u9762\u3002\u4f46pSG.get_Items()\u65b9\u6cd5\u6267\u884c\u65f6\u4e5f\u4e0d\u62a5\u9519\uff0c\u4e14\u5728engine\u4e0b\u90fd\u6ca1\u6709\u95ee\u9898\u2026\u2026\u6700\u540e\u53d1\u73b0\uff0c\u5728pSG.get_Items()\u4e4b\u540e\uff0cpESGI.Next();\u4e4b\u524d\uff0c\u63d2\u5165\u4e00\u53e5pESGI.Reset()\u95ee\u9898\u5c31\u89e3\u51b3\u4e86\uff0c\u6bd4\u8f83\u65e0\u5398\u5934\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[8,9],"_links":{"self":[{"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=\/wp\/v2\/posts\/61"}],"collection":[{"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":0,"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.newnaw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}