Mapx用xml建立點圖層

來源:互聯網
上載者:User

     Mapx4.*中,並不支援xml,到5以後,建立ds支援xml了,聽起來很美,但是,在網上居然沒有找到一個說這個的,難道mapx就沒人用了嗎?

     只好就著mapx的協助,慢慢實驗,比較麻煩的是xml的格式。例子中倒是有

 

Sample A

<xml xmlns:s="urn:schema-microsoft-com:xml-data" xmlns:ds="urn:schemas-microsoft-com:rowset" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:x="#DatsetSchema">

<!-- schema -->

<s:schema>

<s:elementType name='row' content='eltOnly'>

<s:attributeType name='StateAbbr' dt:type='string'/>

<s:attributeType name='StateName' dt:type='string'/>

<s:attributeType name='StatePop' dt:type='14'/>

<extends type='rowbase'/>

</s:elementType>

</s:schema>

<!-- data -->

<ds:data>

<x:row StateAbbr ='AK'StateName='Alaska' StatePop='550043'/>

<x:row StateAbbr ='NY' StateName='New York' StatePop='17990455'/>

</ds:data>

</xml>

Sample B

<xml xmlns="#xmldataset">

<!-- schema -->

<schema>

<elementType name='row' content='eltOnly'>

<attributeType name='StateAbbr' type='string'/>

<attributeType name='StateName' type='string'/>

<attributeType name='StatePop' type='14'/>

<extends type='rowbase'/>

</elementType>

</schema>

<data>

<row StateAbbr ='AK'StateName='Alaska'StatePop=' 550043'/>

<row StateAbbr ='NY' StateName='New York' StatePop='17990455'/>

</data>

</xml>

 

     結果,報錯,另外我的想法是要在xml中放xy的資料,所以進行改造,結果就報這個錯:

     看了bindlayer的屬性,沒有哪個跟關鍵字有關係的,只好在xml中找,可這個東西讓人完全迷惑,還找不到有用的資料。msdn中schma的介紹又雲山霧罩的,找到很多類似的,如:

rs:number=2 rs:nullable=true rs:maydefer=true rs:writeunknown=true

     明顯感覺應該就是這個東西控制列的屬性描述,但始終找不到那個詞。最終,在整個互連網上找到這麼一個:

http://zhidao.baidu.com/question/10915787.html?si=1

     <s:AttributeType name='ID' rs:number='1' rs:maydefer='true' rs:writeunknown='true' rs:basetable='ReadHistory'
rs:basecolumn='ID' rs:keycolumn='true' rs:autoincrement='true'>

      就是我要的東西,修改xml,成功!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.