Sample code for ASP + MAPXTREME - Add a layer with LayerInfo and add a point

xiaoxiao2021-03-06  39

Call CreateMapxLayerInfo (Li) // Then specify the type, the parameters must be: li.type, li.addparameter

CreateMapfields (FLD) / / then add field addstringfield

Session (cmapxobject) .Layers.Add (li) // Add a layer

Session (cMapxObject) .datasets.add midatasetlayer, as the Layer object of the data source, the name of the data set returned after binding, the name of the bound layer

CreateMAppoint (ptcenter) / / then specify the latitude and longitude

FT1 = session (cmapxObject) .FeatureFactory.createSymbol (PNT, session (cMapxObject) .defaultStyle

Set ft2 = session (cmapxObject) .Layers ("new"). AddFeature (ft1) // ft1 is a free primer, the following must be operated on the FT2

Set rvs = session (cmapxobject) .DataSets ("new"). RowValues ​​(ft2) / / then set a field value one by one

ft2.Update 1, RVS / / must bring these two parameters, if you use Keyfield / KeyValue, you don't have to

转载请注明原文地址:https://www.9cbs.com/read-75749.html

New Post(0)