Projets-2016-2017-GrenobloisFute: Difference between revisions
Jump to navigation
Jump to search
Lucas.Guerry (talk | contribs) No edit summary |
Lucas.Guerry (talk | contribs) No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Project presentation= |
=Project presentation= |
||
[[File:Screenshot_app.png|300px|thumb|Application screenshot]] |
|||
[[File:Screenshot_greffons.png|300px|thumb|Managers plugins screenshot]] |
|||
[[File:Screenshot_plugin.png|300px|thumb|Plugin activation screenshot]] |
|||
=Team= |
=Team= |
||
* Supervisor : Nicolas Palix |
* Supervisor : Nicolas Palix |
||
* Members : |
* Members : GUERRY Lucas/ VIAL-GRELIER Aymeric |
||
* Department : RICM4 |
* Department : RICM4 |
||
=Links= |
=Links= |
||
*Github : https://github.com/ |
*Github : https://github.com/Gr05/Osmand |
||
=Progress of the project= |
=Progress of the project= |
||
==''Week 1 (January |
==''Week 1 (January 9th - January 15th)''== |
||
Choice of the subject |
Choice of the subject |
||
==''Week 2 (January |
==''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. |
|||
*Installation of the various tools required for application development : |
|||
** JAVA 1.8 |
|||
** SDK Android API 15 |
|||
* |
*Fork of the git project |
||
*Thinking about tools to use to develop the application: Cordova or native code |
|||
*Project outlook : |
|||
** Cordova => find a target (« only » display the map is useless) |
|||
** Native code => OSMand gives the possibility of routing thereafter |
|||
** Conclusion : Find an interesting extension to Cordova or do native code |
|||
*Try building application on both computer. |
|||
*Requirements |
|||
**Functional requirements: |
|||
***Viewing the traffic on a Grenoble map |
|||
***Update in real time |
|||
***Non-functional requirements: |
|||
***Network quality |
|||
***Reliability |
|||
***Updating the map of Grenoble |
|||
***Ergonomic |
|||
==''Week 3 (January |
==''Week 3 (January 23th - January 29th)''== |
||
Reading / understanding the code |
|||
*The project doesn't build on one on the two computers so trying to understand why : |
|||
==''Week 4 (February 1st - February 7th)''== |
|||
**Downloading differents JDK and SDK |
|||
*Reflexion about the libraries available in JAVA to carry the parser JSON.org, JACKSON |
|||
**Reading documentation of OsmAnd |
|||
*Viewing text when activating the plugin (detection where to write the plugin code) |
|||
**Setting up environnement. |
|||
**Contacting OsmAnb by email to get more information. |
|||
==''Week |
==''Week 4 (January 30th - February 5th)''== |
||
*Finally manage build on both computer. |
|||
*Choice of the library : JACKSON |
|||
*Begin to look at source code and where and how pluggin is implemented (with help of previous group on this project) |
|||
*Realization of an application in stand-alone |
|||
*Link to SkiMapPlugin to test |
|||
*Goal : direct link to our plugin |
|||
==''Week 5 (February 6th - February 12th)''== |
|||
===Design pattern=== |
|||
*Begin to work on the Parser. |
|||
* Adapter : Using data / external applications : métromobilités & OSMand data |
|||
*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) |
|||
* Memento : Restoration of the application if we remove the plugin |
|||
*Resolving merge issue. |
|||
* Observer : To change its state, the map must be informed of the change of traffic data |
|||
* MVC : model view controller architecture to separate the representation of the map and data |
|||
==''Week 6 (February |
==''Week 6 (February 27st - March 5th)''== |
||
*First implementation of a fake traficLayer based on paringPointLayer in goals of use it on our pluggin. |
|||
*Beginning of parser adaptation for the project |
|||
*Try tu use renderer but doesn't works. |
|||
*Bug resolution to redirect to our plugin |
|||
*CI jenkins installation on private server and configuration. |
|||
==''Week 7 (March |
==''Week 7 (March 6th - March 12th)''== |
||
*Bug |
*Bug resolution on the renderer. |
||
*presentation mi-project. |
|||
*We now can change the color of a route |
|||
==''Week 8 (March |
==''Week 8 (March 6th - March 12th)''== |
||
*find out how to stroke pathes with different color and width : |
|||
*Progress in the parser |
|||
**for a path made up of 1 line : |
|||
private Paint fluidTrafficPaint; |
|||
public void initLayer(OsmandMapTileView view) { |
|||
==''Week 9 (March 21th - March 27th)''== |
|||
this.view = view; |
|||
*Parser finished in JAVA, to integrate Android Studio |
|||
dm = new DisplayMetrics(); |
|||
*Search the GPS code and other plugins to find how to change the color of a section of road |
|||
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) { |
|||
==''Week 10 (March 28th - April 3rd)''== |
|||
LatLon point1 = new LatLon(45.18475, 5.73635); |
|||
*XML parser implemented, integrated into Android Studio |
|||
LatLon point2 = new LatLon(45.18475, 5.73035); |
|||
*Creation of the Traffic Layer class that will be used to draw the road sections along the lines of class GPXLayer and DistanceCalculatorPlugin |
|||
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 : |
|||
==''Week 11 (April 4th - April 10th)''== |
|||
public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) { |
|||
*Change of librairies for JSON parser for integration in Android Studio: using JSON.org |
|||
Bitmap parkingIcon = parkingNoLimitIcon; |
|||
*Integration of XML parser in Android Studio: use of DOM and SAX libraries |
|||
int marginX = parkingNoLimitIcon.getWidth() / 2; |
|||
*Link with the plugin manager to enable or disable the plugin |
|||
int marginY = parkingNoLimitIcon.getHeight() / 2; |
|||
*Creation of the report, flyer and slides |
|||
canvas.rotate(-view.getRotate(), locationX1, locationY1); |
|||
canvas.drawBitmap(parkingIcon, locationX1 - marginX, locationY1 - marginY, bitmapPaint); |
|||
} |
Latest revision as of 17:02, 14 March 2017
Project presentation
Team
- Supervisor : Nicolas Palix
- Members : GUERRY Lucas/ VIAL-GRELIER Aymeric
- Department : RICM4
Links
- Github : https://github.com/Gr05/Osmand
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); }