b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

mapxtreme_mapxtreme编程_基于mapxtreme的vs编程

电脑杂谈  发布时间:2017-01-24 09:20:37  来源:网络整理
mapxtreme

//ASSUMPTIONS:

//ThevariablemapjisoftypeMapJandhasloadedamap

//ThevariablereqisoftypeHttpServletRequest

//ThevariableresisoftypeHttpServletResponse

//ThevariabledpisoftypeDoublePoint

//Addannotationlayer-thislayerwillconsistofoneimagesymbolto"animate"

//注解表格提供帮助类

AnnotationTableDescHelperatdh=newAnnotationTableDescHelper("Animation_Layer");

//注解数据服务帮助类

AnnotationDataProviderHelperadph=newAnnotationDataProviderHelper();

//本地数据服务引用

LocalDataProviderRefldpr=newLocalDataProviderRef(adph);

//创建注解图层

Layeranimate_layer=mapj.getLayers().insert(ldpr,atdh,0,"Animation_Layer");

//定义注点

Renditionr=RenditionImpl.getDefaultRendition();

r.setvalue(Rendition.SYMBOL_MODE,Rendition.SymbolMode.IMAGE);

r.setvalue(Rendition.SYMBOL_URL,"file:///C:/images/car.gif");

//创建这个点-----

//先创建特征工厂

FeatureFactoryff=mapj.getFeatureFactory();

//包含单个属性的数组

Attribute[]aAIntAttribute={newAttribute(33)};

//创建Integer

PrimaryKeypkey=newPrimaryKey(aAIntAttribute);

Featuref=ff.createPoint(dp,r,aAIntAttribute,pkey);

PrimaryKeypk=animate_layer.addFeature(f);

//CreatetheImageRequestComposer

ImageRequestComposerimageRC=ImageRequestComposer.create(mapj,256,Color.blue,"image/gif");

/*

Createthecompositerenderer

Rendertheimage

Streamtheimagebacktotheclient

*/

CompositeRenderercompositeRenderer=newCompositeRenderer("http://localhost:8080/mapxtreme40/servlet/mapxtreme";,0);

compositeRenderer.render(imageRC);

ServletOutputStreamsos=res.getOutputStream();

compositeRenderer.toStream(sos);

//Setthisattributetofalsesothatthebottomimageisnotrenderednexttime

compositeRenderer.setRedrawBottom(false);

}catch(Exceptione){

//Takeappropriateerrorhandlingsteps

}相关部分有示例代码。mapxtreme

这段代码我有,但是不知道怎么用,能不能说明下如何使用


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-28469-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...