Package com.lbslocal.cc.objects.v0.common

Examples of com.lbslocal.cc.objects.v0.common.Icon


    return mi;
  }

  public MapInfo getZoomWindow(String routeId, Extent oldExtent, Extent newExtentInPixels, MapOptions mo, int idLicenca, int methodID)
      throws Exception {
    MapInfo mi = new MapInfo();

    try {
      Extent newExtent = getNewExtent(oldExtent, newExtentInPixels, mo.getMapSize());
      mi = renderMap(routeId, "", newExtent, mo, idLicenca, methodID);
View Full Code Here


    }
    return mi;
  }

  public MapInfo getZoomCity(String routeId, MapOptions mo, City city, int idLicenca, int methodID) throws Exception {
    MapInfo mi = new MapInfo();

    // *** validar se a cidade foi informada ***//*
    if (city.getName() == null || city.getName().compareTo("") == 0) {
      throw (new Exception("getZoomCity: Cidade n�o foi informada. "));
    }

    // *** for�ar em letras maiusculas ***//*
    city.setName(city.getName().toUpperCase());
    String uf = city.getState().toUpperCase();

    // *** validar se a uf foi informada ***//*
    String codUf = Functions.retornaCodUf(uf);

    if (codUf.compareTo("") == 0)
      throw (new Exception("getZoomCity: Uf informado � inv�lido (" + uf + "). Cidade informada: " + city.getName()));

    try {
      mi.setExtent(getExtentCitySQL(city, idLicenca));

      // gerar mapa com base no extent retornado
      mi = renderMap(routeId, "", mi.getExtent(), mo, idLicenca, methodID);
    } catch (Exception ex) {
      Utils.LogError("CC","getZoomCity- IdWebservice : 6", "city.name-> " + city.getName() + " | " + "city.state -> " + city.getState()
          + " | " + ex.getMessage() + "|" + ex.getStackTrace());

      throw (new Exception("getZoomCity: Falha ao gerar o zoom da cidade informada (" + city.getName() + "-" + city.getState() + ")."));
View Full Code Here

    // *** validar se a uf foi informada ***//*
    if (uf.compareTo("") == 0) {
      throw (new Exception("getZoomCity: Uf deve ser informada."));
    }

    MapInfo mi = new MapInfo();

    try {
      mi.setExtent(getExtentStateSQL(uf, idLicenca, "Brasil"));

      // gerar mapa com base no extent retornado
      mi = renderMap(routeId, "", mi.getExtent(), mo, idLicenca, methodID);
    } catch (Exception ex) {
      Utils.LogError("CC","getZoomState- IdWebservice : 4", "estado -> " + uf + " | " + ex.getMessage() + "|" + ex.getStackTrace());

      throw (new Exception("getZoomState: Falha ao gerar o zoom do estado informado: " + ex.getMessage()));
    }
View Full Code Here

    }
    return mi;
  }

  public MapInfo getZoomFullExtent(String routeId, MapOptions mo, int idLicenca, int methodID) throws Exception {
    MapInfo mi = new MapInfo();

    try {
      Point point = new Point(-62.9569009522848, -21.3320991286825);

      Extent ext = Functions.CalcRadius(3800045, point);
View Full Code Here

    /* retornar ponto encontrado */
    return point;
  }

  public MapInfo getXYRadiusWithMap(Address address, MapOptions mo, int radius, int idLicenca, int methodID) throws Exception {
    MapInfo mi = new MapInfo();
    try {
      /*
       * chama webMethod getXY para saber a coordenada do endere�o
       * informado
       */
 
View Full Code Here

        response.setCharacterEncoding("UTF-8");
       
        ObjectsHelper[] dependencyObjects = new ObjectsHelper[6];
       
        dependencyObjects[0] = cr.new ObjectsHelper();
        dependencyObjects[0].object = new MapInfo();
        dependencyObjects[0].alias = "MapInfo";
       
        dependencyObjects[1] = cr.new ObjectsHelper();
        dependencyObjects[1].object = new SegmentDescription();
        dependencyObjects[1].alias = "SegmentDescription";
View Full Code Here

  }

  public MapInfo getXYRadiusWithMap(Address address, MapOptions mo, int radius, int idLicenca) throws Exception {
    iniDate = System.currentTimeMillis();

    MapInfo mi = new MapInfo();

    try {
      mi = ca.getXYRadiusWithMap(address, mo, radius, idLicenca, CommonAddress._getXYRadiusWithMap);
      Functions.gravarLogUnique(idLicenca, CommonAddress._getXYRadiusWithMap, 0, iniDate, 0);
    } catch (Exception e) {
View Full Code Here

      routeOptions.getVehicle().setTankCapacity(ro.getVehicle().getTankCapacity());
      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());
      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rpi = r.getRoute(idLicenca, rs, routeOptions, CommonRoute._getRoute);
     
      ri.setMapInfo(new MapInfo());
      ri.getMapInfo().setExtent(new Extent());
      ri.getMapInfo().getExtent().setXMax(rpi.getMapInfo().getExtent().getXMax());
      ri.getMapInfo().getExtent().setXMin(rpi.getMapInfo().getExtent().getXMin());
      ri.getMapInfo().getExtent().setYMax(rpi.getMapInfo().getExtent().getYMax());
      ri.getMapInfo().getExtent().setYMin(rpi.getMapInfo().getExtent().getYMin());
View Full Code Here

      routeOptions.getVehicle().setTollFeeCat(ro.getVehicle().getTollFeeCat());

      CommonRoute r = new CommonRoute(_maquina, _server, _port, _output, _dns, _dataSource, _dataSourceMapa);
      rpi = r.getRouteWithMap(idLicenca, CommonRoute._getRouteWithMap, rs, routeOptions, mo);

      ri.setMapInfo(new MapInfo());
      ri.getMapInfo().setExtent(new Extent());
      ri.getMapInfo().getExtent().setXMax(rpi.getMapInfo().getExtent().getXMax());
      ri.getMapInfo().getExtent().setXMin(rpi.getMapInfo().getExtent().getXMin());
      ri.getMapInfo().getExtent().setYMax(rpi.getMapInfo().getExtent().getYMax());
      ri.getMapInfo().getExtent().setYMin(rpi.getMapInfo().getExtent().getYMin());
View Full Code Here

       
        mapOptionsDependencyObjects[3] = cr.new ObjectsHelper();
        mapOptionsDependencyObjects[3].object = new Point();
        mapOptionsDependencyObjects[3].alias = "point";
 
        MapOptions mo = (MapOptions) cr.getObjectFromXML(ph.XMLFile, "mo", MapOptions.class, mapOptionsDependencyObjects);
       
        String routeId = cr.getFieldFromXML(ph.XMLFile, "routeId");
        int radius = Integer.valueOf(cr.getFieldFromXML(ph.XMLFile, "radius"));
       
        try
        {
          mi = cMr.getZoomRadius(routeId, point, radius, mo, id_licenca, mapType);
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
       
        response.setContentType("text/xml");
        response.setCharacterEncoding("UTF-8");
       
        ObjectsHelper[] dependencyObjects = new ObjectsHelper[2];
       
        dependencyObjects[0] = cr.new ObjectsHelper();
        dependencyObjects[0].object = new Extent();
        dependencyObjects[0].alias = "extent";
       
        dependencyObjects[1] = cr.new ObjectsHelper();
        dependencyObjects[1].object = new MapInfo();
        dependencyObjects[1].alias = "MapInfo";

        response.getWriter().write("<?xml version='1.0' encoding='UTF-8'?>\n" + cr.getXMLFromObject(mi, dependencyObjects) + "");
      }
      if (ph.fields[0].equals("getMap"))
      {
        MapInfo mi = new MapInfo();
       
        String mapType = cr.getFieldFromXML(ph.XMLFile, "maptype");
       
        if (!mapType.toLowerCase().equals("gif") && !mapType.toLowerCase().equals("png") && !mapType.toLowerCase().equals("jpg") ){
          mapType = "png";
        }
       
        Extent extent = (Extent) cr.getObjectFromXML(ph.XMLFile, "extent", Extent.class, null);
       
        ObjectsHelper[] mapOptionsDependencyObjects = new ObjectsHelper[4];
       
        mapOptionsDependencyObjects[0] = cr.new ObjectsHelper();
        mapOptionsDependencyObjects[0].object = new MapSize();
        mapOptionsDependencyObjects[0].alias = "mapSize";
       
        mapOptionsDependencyObjects[1] = cr.new ObjectsHelper();
        mapOptionsDependencyObjects[1].object = new Icon[0];
        mapOptionsDependencyObjects[1].alias = "icon";
       
        mapOptionsDependencyObjects[2] = cr.new ObjectsHelper();
        mapOptionsDependencyObjects[2].object = new Icon();
        mapOptionsDependencyObjects[2].alias = "Icon";
       
        mapOptionsDependencyObjects[3] = cr.new ObjectsHelper();
        mapOptionsDependencyObjects[3].object = new Point();
        mapOptionsDependencyObjects[3].alias = "point";
 
        MapOptions mo = (MapOptions) cr.getObjectFromXML(ph.XMLFile, "mo", MapOptions.class, mapOptionsDependencyObjects);
       
        String routeId = cr.getFieldFromXML(ph.XMLFile, "routeId");

       
        try
View Full Code Here

TOP

Related Classes of com.lbslocal.cc.objects.v0.common.Icon

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.