Package org.primefaces.model.map

Examples of org.primefaces.model.map.DefaultMapModel


  }

  @Override
  public MapModel getMapModelFromTrip(Trip trip) throws ServiceException {
    MapModel mapModel = new DefaultMapModel();
    List<Point> pointList = getPointsForTrip(trip);
    if (pointList.isEmpty()) {
      pointList = this.loadAndPersistGoogleData(trip);
    }
    Polyline polyline = new Polyline();
    polyline.getPaths().addAll(pointList);

    Marker beginMarker = new Marker(pointList.get(0), trip.getWaypoint()
        .getFromLocation().getCity());
    Marker endMarker = new Marker(pointList.get(pointList.size() - 1), trip
        .getWaypoint().getToLocation().getCity());

    polyline.setStrokeWeight(10);
    polyline.setStrokeColor("#FF9900");
    polyline.setStrokeOpacity(0.7);

    mapModel.addOverlay(beginMarker);
    mapModel.addOverlay(polyline);
    mapModel.addOverlay(endMarker);
    return mapModel;
  }
View Full Code Here


    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    public MapModel getMapModel() {
        MapModel model = new DefaultMapModel();
       
        return model;
    }
View Full Code Here

 
    private MapModel simpleModel; 
 
    public MapBean() { 
      System.out.println("Creando MapaBean...");
        simpleModel = new DefaultMapModel()
         
        //Shared coordinates 
        LatLng coord1 = new LatLng(-12.061276302138568,-77.04394340515137)
        /*LatLng coord2 = new LatLng(36.883707, 30.689216); 
        LatLng coord3 = new LatLng(36.879703, 30.706707); 
View Full Code Here

TOP

Related Classes of org.primefaces.model.map.DefaultMapModel

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.