Permalink
Browse files

[Mobile,Wear,Widget] Updated to support new Luas Green Line (Cross Ci…

…ty) extension, with all new stops. Fixed bug where "Gleann Bhríde" would not show when app was in Gaeilge language (ga locale). This was due to the name "Brides Glen" being changed to "Bride's Glen" on the RTPI backend.
  • Loading branch information...
thecosmicfrog committed Dec 4, 2017
1 parent 563e889 commit 4c378c8dea95fa7fb36fa3225a7856febe5356fd
@@ -273,8 +273,201 @@ private void drawPolylines(GoogleMap googleMap, List<String> listStopNamesRedLin
);
}
/* Draw Polylines from St. Stephen's Green to Brides Glen. */
for (int i = 0; i < listStopNamesGreenLine.size() - 1; i++) {
/* Draw Polylines from Broombridge to Parnell. */
for (int i = 0; i < 6; i++) {
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[i][0], stopCoordsGreenLine[i][1]),
new LatLng(stopCoordsGreenLine[i + 1][0], stopCoordsGreenLine[i + 1][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
}
/* Draw Polylines from Parnell to Marlborough. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[6][0], stopCoordsGreenLine[6][1]),
new LatLng(stopCoordsGreenLine[9][0], stopCoordsGreenLine[9][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polyline from Marlborough to the corner of Hawkins Street and College Street. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[9][0], stopCoordsGreenLine[9][1]),
new LatLng(53.34575198, -6.25701415)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polyline from the corner of Hawkins Street and College Street to Trinity. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34575198, -6.25701415),
new LatLng(stopCoordsGreenLine[11][0], stopCoordsGreenLine[11][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/*
* Draw Polylines around College Green, Grafton Street and Nassau Street, up to Dawson
* Street.
*/
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[11][0], stopCoordsGreenLine[11][1]),
new LatLng(53.34495296, -6.25920819)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34495296, -6.25920819),
new LatLng(53.34442293, -6.25948714)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34442293, -6.25948714),
new LatLng(53.34398738, -6.25921892)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34398738, -6.25921892),
new LatLng(53.34334845, -6.25924306)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34334845, -6.25924306),
new LatLng(53.34318512, -6.25905799)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34318512, -6.25905799),
new LatLng(53.34293531, -6.25772225)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34293531, -6.25772225),
new LatLng(stopCoordsGreenLine[12][0], stopCoordsGreenLine[12][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polylines from Dawson to the end of Dawson Street. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[12][0], stopCoordsGreenLine[12][1]),
new LatLng(53.33950349, -6.25881123)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polylines from the end of Dawson Street to St. Stephen's Green. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.33950349, -6.25881123),
new LatLng(53.33952431, -6.25876563)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.33952431, -6.25876563),
new LatLng(53.33987183, -6.26049566)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.33987183, -6.26049566),
new LatLng(53.33975012, -6.26091944)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.33975012, -6.26091944),
new LatLng(stopCoordsGreenLine[13][0], stopCoordsGreenLine[13][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polylines from Trinity to Westmoreland. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[11][0], stopCoordsGreenLine[11][1]),
new LatLng(53.34532925, -6.25917064)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34532925, -6.25917064),
new LatLng(stopCoordsGreenLine[10][0], stopCoordsGreenLine[10][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polylines from Westmoreland to O'Connell Street Stops. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[10][0], stopCoordsGreenLine[10][1]),
new LatLng(53.34693688, -6.25911700)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(53.34693688, -6.25911700),
new LatLng(stopCoordsGreenLine[7][0], stopCoordsGreenLine[7][1])
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polyline from O'Connell - Upper to Parnell Street and close the loop. */
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[7][0], stopCoordsGreenLine[7][1]),
new LatLng(53.352594325768045, -6.261551109496622)
).width(12.0f).color(
ContextCompat.getColor(getApplicationContext(), R.color.tab_green_line)
)
);
/* Draw Polylines from St. Stephen's Green to Bride's Glen. */
for (int i = 13; i < listStopNamesGreenLine.size() - 1; i++) {
googleMap.addPolyline(
new PolylineOptions().add(
new LatLng(stopCoordsGreenLine[i][0], stopCoordsGreenLine[i][1]),
@@ -66,6 +66,19 @@ public EnglishGaeilgeMap() {
put("Saggart", "Teach Sagard");
/* Green Line */
put("Broombridge", "Droichead Broome");
put("Cabra", "Cabrach");
put("Phibsborough", "Baile Phib");
put("Grangegorman", "Gráinseach Ghormáin");
put("Broadstone - DIT", "An Clochán Leathan - ITBhÁC");
put("Dominick", "Doiminic");
put("Parnell", "Parnell");
put("O'Connell - Upper", "Ó Conaill - Uachtarach");
put("O'Connell - GPO", "Ó Conaill - AOP");
put("Marlborough", "Maoilbhríde");
put("Westmoreland", "Westmoreland");
put("Trinity", "An Tríonóid");
put("Dawson", "Dásáin");
put("St. Stephen's Green", "Faiche Stiabhna");
put("Harcourt", "Sráid Fhearchair");
put("Charlemont", "Charlemont");
@@ -87,6 +100,6 @@ public EnglishGaeilgeMap() {
put("Carrickmines", "Carraig Mhaighin");
put("Laughanstown", "Baile an Locháin");
put("Cherrywood", "Coill na Silíní");
put("Brides Glen", "Gleann Bhríde");
put("Bride's Glen", "Gleann Bhríde");
}
}
@@ -64,6 +64,19 @@
{ 53.28483859, -6.43777514 }, /* Saggart */
};
private double[][] stopCoordsGreenLine = new double[][] {
{ 53.37254168, -6.29840233 }, /* Broombridge */
{ 53.36385473, -6.28157952 }, /* Cabra */
{ 53.36009486, -6.27861970 }, /* Phibsborough */
{ 53.35727273, -6.27731346 }, /* Grangegorman */
{ 53.35407420, -6.27392315 }, /* Broadstone - DIT */
{ 53.35124424, -6.26531198 }, /* Dominick */
{ 53.35301900, -6.26047044 }, /* Parnell */
{ 53.35165250, -6.26117601 }, /* O'Connell - Upper */
{ 53.34880980, -6.25992879 }, /* O'Connell - GPO */
{ 53.34915970, -6.25775202 }, /* Marlborough */
{ 53.34623832, -6.25914424 }, /* Westmoreland */
{ 53.34518877, -6.25865324 }, /* Trinity */
{ 53.34209496, -6.25801637 }, /* Dawson */
{ 53.33911033, -6.26139200 }, /* St. Stephen's Green */
{ 53.33364891, -6.26269019 }, /* Harcourt */
{ 53.33060239, -6.25862396 }, /* Charlemont */
@@ -85,7 +98,7 @@
{ 53.25436204, -6.17160237 }, /* Carrickmines */
{ 53.25063905, -6.15495121 }, /* Laughanstown */
{ 53.24538459, -6.14582634 }, /* Cherrywood */
{ 53.24186949, -6.14277935 }, /* Brides Glen */
{ 53.24186949, -6.14277935 }, /* Bride's Glen */
};
private double[][] stopCoords = new double[0][0];
@@ -61,6 +61,19 @@ public StopNameIdMap(String localeDefault) {
put("Teach Sagard", "SAG");
/* Green Line */
put("Droichead Broome", "BRO");
put("Cabrach", "CAB");
put("Baile Phib", "PHI");
put("Gráinseach Ghormáin", "GRA");
put("An Clochán Leathan - ITBhÁC", "BRD");
put("Doiminic", "DOM");
put("Parnell", "PAR");
put("Ó Conaill - Uachtarach", "OUP");
put("Ó Conaill - AOP", "OGP");
put("Maoilbhríde", "MAR");
put("Westmoreland", "WES");
put("An Tríonóid", "TRY");
put("Dásáin", "DAW");
put("Faiche Stiabhna", "STS");
put("Sráid Fhearchair", "HAR");
put("Charlemont", "CHA");
@@ -119,6 +132,19 @@ public StopNameIdMap(String localeDefault) {
put("Saggart", "SAG");
/* Green Line */
put("Broombridge", "BRO");
put("Cabra", "CAB");
put("Phibsborough", "PHI");
put("Grangegorman", "GRA");
put("Broadstone - DIT", "BRD");
put("Dominick", "DOM");
put("Parnell", "PAR");
put("O'Connell - Upper", "OUP");
put("O'Connell - GPO", "OGP");
put("Marlborough", "MAR");
put("Westmoreland", "WES");
put("Trinity", "TRY");
put("Dawson", "DAW");
put("St. Stephen's Green", "STS");
put("Harcourt", "HAR");
put("Charlemont", "CHA");
@@ -140,7 +166,7 @@ public StopNameIdMap(String localeDefault) {
put("Carrickmines", "CCK");
put("Laughanstown", "LAU");
put("Cherrywood", "CHE");
put("Brides Glen", "BRI");
put("Bride's Glen", "BRI");
}
}
}
@@ -215,6 +215,19 @@
<string-array name="array_stops_greenline">
<item>Roghnaigh stad\u2026</item>
<item>Droichead Broome</item>
<item>Cabrach</item>
<item>Baile Phib</item>
<item>Gráinseach Ghormáin</item>
<item>An Clochán Leathan - ITBhÁC</item>
<item>Doiminic</item>
<item>Parnell</item>
<item>Ó Conaill - Uachtarach</item>
<item>Ó Conaill - AOP</item>
<item>Maoilbhríde</item>
<item>Westmoreland</item>
<item>An Tríonóid</item>
<item>Dásáin</item>
<item>Faiche Stiabhna</item>
<item>Sráid Fhearchair</item>
<item>Charlemont</item>
@@ -273,6 +286,19 @@
<item>Campas Gnó Iarthar na Cathrach</item>
<item>Baile Uí Fhoirtcheirn</item>
<item>Teach Sagard</item>
<item>Droichead Broome</item>
<item>Cabrach</item>
<item>Baile Phib</item>
<item>Gráinseach Ghormáin</item>
<item>An Clochán Leathan - ITBhÁC</item>
<item>Doiminic</item>
<item>Parnell</item>
<item>Ó Conaill - Uachtarach</item>
<item>Ó Conaill - AOP</item>
<item>Maoilbhríde</item>
<item>Westmoreland</item>
<item>An Tríonóid</item>
<item>Dásáin</item>
<item>Faiche Stiabhna</item>
<item>Sráid Fhearchair</item>
<item>Charlemont</item>
@@ -0,0 +1,22 @@
<resources>
<!--
TODO: Before you release your application, you need a Google Maps API key.
To do this, you can either add your release key credentials to your existing
key, or create a new key.
Note that this file specifies the API key for the release build target.
If you have previously set up a key for the debug target with the debug signing certificate,
you will also need to set up a key for your release certificate.
Follow the directions here:
https://developers.google.com/maps/documentation/android/signup
Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">
AIzaSyAbAcqNYmNdUjg4beIR_lq9TBwzXOYXskw
</string>
</resources>
Oops, something went wrong.

0 comments on commit 4c378c8

Please sign in to comment.