Package chunmap.view

Examples of chunmap.view.Map


  private byte[] createData() throws IOException {
    // create map
//    View view = new ViewPort(width, height,3);
//    Painter painter = new Painter(width, height);
    Map map = new Map(width, height);
    map.getLayerCollection().setLayers(capbilities.getLayers());

    // getImage
    map.getView().setViewEnvelop(envelop);
    map.render();
    Image image = (Image)map.getPainter().getData();

    // toByteArray
    return ImageUtil.Image2ByteArray(image, formatName);
  }
View Full Code Here


    operateManager=new OperateManager(this,component);
  }
 
  private void init(int width, int height) {
   
    map = new Map(width, height);
    bufferImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
   
//    thread = new RenderThread();
//    thread.addListener(new RenderListener() {
//      @Override
View Full Code Here

      String xs = request.getParameter("X");
      String ys = request.getParameter("Y");
      //Envelope envelop = parseEnvelop(x,y);
     
      Map map = new Map(width, height);
      map.getView().setViewEnvelop(envelop);
     
      double x = Double.valueOf(xs);
      double y = Double.valueOf(ys);
      double d = 5d;
      double minx = x - d;
      double miny = y - d;
      double maxx = x + d;
      double maxy = y + d;
      Envelope env = new Envelope(minx, miny, maxx, maxy);
      Transform trans = map.getView().screen2World();
      Envelope env2 = env.transform(trans);
     
      String sizes= request.getParameter("FEATURE_COUNT");
      int size=100;
      if(sizes!=null){
View Full Code Here

    if(image!=null){
      return image;
    }
   
    // renderMap
    Map map;
    map = new Map(GoogleMapCode.tileSize, GoogleMapCode.tileSize);
    map.getLayerCollection().setLayers(layers);
   
    map.getView().setViewEnvelop(code.getEnvelope(tile));
    map.render();
    image = map.getPainter().getData();
   
    cache.save(image, name);
   
    return image;
  }
View Full Code Here

  private void init(int width, int height) {
    View view = new ViewPort(width, height,buffer);
    Painter painter = new Painter(width + buffer, height + buffer);

    map = new Map(view, painter);

    // Load data
    String path1=
        "D:\\ChunMap\\ChunMap1.1.1\\Data\\gs\\region.shp";
    String path2=
View Full Code Here

TOP

Related Classes of chunmap.view.Map

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.