Projets-2016-2017-GrenobloisFute

From air
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Project presentation

Team

  • Supervisor : Nicolas Palix
  • Members : GUERRY Lucas/ VIAL-GRELIER Aymeric
  • Department : RICM4

Links

Progress of the project

Week 1 (January 9th - January 15th)

Choice of the subject

Week 2 (January 16th - January 22th)

  • Research of the source code on GitHub because the project of the previous students isn't up to date.
  • Fork of the git project
  • Try building application on both computer.

Week 3 (January 23th - January 29th)

  • The project doesn't build on one on the two computers so trying to understand why :
    • Downloading differents JDK and SDK
    • Reading documentation of OsmAnd
    • Setting up environnement.
    • Contacting OsmAnb by email to get more information.

Week 4 (January 30th - February 5th)

  • Finally manage build on both computer.
  • Begin to look at source code and where and how pluggin is implemented (with help of previous group on this project)

Week 5 (February 6th - February 12th)

  • Begin to work on the Parser.
  • First implementation with add of a fake pluggin based on the skiMapPluggin (and then remplacing the information and understanding how it works at the same time)
  • Resolving merge issue.

Week 6 (February 27st - March 5th)

  • First implementation of a fake traficLayer based on paringPointLayer in goals of use it on our pluggin.
  • Try tu use renderer but doesn't works.
  • CI jenkins installation on private server and configuration.

Week 7 (March 6th - March 12th)

  • Bug resolution on the renderer.
  • presentation mi-project.

Week 8 (March 6th - March 12th)

  • find out how to stroke pathes with different color and width :
    • for a path made up of 1 line :
private Paint fluidTrafficPaint;
public void initLayer(OsmandMapTileView view) {
       this.view = view;
       dm = new DisplayMetrics();
       WindowManager wmgr = (WindowManager) view.getContext().getSystemService(Context.WINDOW_SERVICE);
       wmgr.getDefaultDisplay().getMetrics(dm);
       bitmapPaint = new Paint();
       bitmapPaint.setDither(true);
       bitmapPaint.setAntiAlias(true);
       bitmapPaint.setFilterBitmap(true);
       parkingNoLimitIcon = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_poi_parking_pos_no_limit);
       //basic paint
       Paint paint = new Paint();
       paint.setStyle(Paint.Style.STROKE);
       paint.setStrokeWidth(8.5f * view.getDensity());
       paint.setAntiAlias(true);
       paint.setStrokeCap(Paint.Cap.ROUND);
       paint.setStrokeJoin(Paint.Join.ROUND);
       // fluid traffic paint
       fluidTrafficPaint = new Paint(paint);
       fluidTrafficPaint.setColor(0x3F00FF00);
       // normal traffic paint
       normalTrafficPaint = new Paint(paint);
       normalTrafficPaint.setColor(0x3FBBFF00);
       // hard traffic paint
       hardTrafficPaint = new Paint(paint);
       hardTrafficPaint.setColor(0x3FFF0000);
       contextMenuLayer = view.getLayerByClass(ContextMenuLayer.class);
}
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) {
       LatLon point1 = new LatLon(45.18475, 5.73635);
       LatLon point2 = new LatLon(45.18475, 5.73035);
       Path path = new Path();
       path.reset();
       double latitude1 = point1.getLatitude();
       double longitude1 = point1.getLongitude();
       double latitude2 = point2.getLatitude();
       double longitude2 = point2.getLongitude();
       float locationX1 = tileBox.getPixXFromLonNoRot(longitude1);
       float locationY1 = tileBox.getPixYFromLatNoRot(latitude1);
       float locationX2 = tileBox.getPixXFromLonNoRot(longitude2);
       float locationY2 = tileBox.getPixYFromLatNoRot(latitude2);
       path.moveTo(locationX1, locationY1);
       path.lineTo(locationX2, locationY2);
       canvas.drawPath(path , paint);
}
    • for an icon :
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) {
       Bitmap parkingIcon = parkingNoLimitIcon;
       int marginX = parkingNoLimitIcon.getWidth() / 2;
       int marginY = parkingNoLimitIcon.getHeight() / 2;
       canvas.rotate(-view.getRotate(), locationX1, locationY1);
       canvas.drawBitmap(parkingIcon, locationX1 - marginX, locationY1 - marginY, bitmapPaint);
}