diff --git a/src/Resources/web/googlemap/dark.css b/deprecated/googlemap-dark.css similarity index 100% rename from src/Resources/web/googlemap/dark.css rename to deprecated/googlemap-dark.css diff --git a/src/Charts/RideMapWindow.cpp b/src/Charts/RideMapWindow.cpp index 2a70d8ad1..5bb843465 100644 --- a/src/Charts/RideMapWindow.cpp +++ b/src/Charts/RideMapWindow.cpp @@ -440,9 +440,7 @@ void RideMapWindow::createHtml() "\n"); if (mapCombo->currentIndex() == OSM) { - // when we have style options we draw the route in cplotmarker colors - // and no opacity since its just a stylised map used for dashboards or - // small thumbnails. + currentPage += QString("function drawRouteForLatLons(latlons) {\n" @@ -471,14 +469,11 @@ void RideMapWindow::createHtml() "routeYellow.on('mouseover', function(event) { webBridge.hoverPath(event.latlng.lat, event.latlng.lng); });\n" "routeYellow.on('mousemove', function(event) { webBridge.hoverPath(event.latlng.lat, event.latlng.lng); });\n" - "}\n").arg(styleoptions == "" ? "#FFFF00" : GColor(CPLOTMARKER).name()) - .arg(styleoptions == "" ? 0.4 : 1.0); + "}\n").arg("#FFFF00") + .arg(0.4); } else if (mapCombo->currentIndex() == GOOGLE) { - // when we have style options we draw the route in cplotmarker colors - // and no opacity since its just a stylised map used for dashboards or - // small thumbnails. currentPage += QString("function drawRouteForLatLons(latlons) {\n" // route will be drawn with these options @@ -506,8 +501,8 @@ void RideMapWindow::createHtml() " google.maps.event.addListener(routeYellow, 'mouseup', function(event) { map.setOptions({draggable: true, zoomControl: true, scrollwheel: true, disableDoubleClickZoom: false}); webBridge.mouseup(); });\n" " google.maps.event.addListener(routeYellow, 'mouseover', function(event) { webBridge.hoverPath(event.latLng.lat(), event.latLng.lng()); });\n" - "}\n").arg(styleoptions == "" ? "#FFFF00" : GColor(CPLOTMARKER).name()) - .arg(styleoptions == "" ? 0.4f : 1.0f); + "}\n").arg("#FFFF00") + .arg(0.4f); } currentPage += QString("function drawIntervals() { \n" @@ -641,8 +636,6 @@ void RideMapWindow::createHtml() // initialise function called when map loaded "function initialize() {\n"); - if (styleoptions == "") { - // TERRAIN style map please and make it draggable // note that because QT webkit offers touch/gesture // support the Google API only supports dragging @@ -653,14 +646,6 @@ void RideMapWindow::createHtml() " style: google.maps.MapTypeControlStyle.DEFAULT\n" " };\n"); - } else { - - // USER DEFINED STYLE OPTIONS - currentPage += QString("" - "var styledMapType = new google.maps.StyledMapType( %1 " - " , {name: 'Styled Map'} );\n" ).arg(styleoptions); - } - currentPage += QString( " var myOptions = {\n" " draggable: true,\n" @@ -669,8 +654,8 @@ void RideMapWindow::createHtml() " disableDefaultUI: %2,\n" " tilt: 45,\n" " streetViewControl: false,\n" - " };\n").arg(styleoptions != "" ? "'styled_map'" : "google.maps.MapTypeId.TERRAIN") - .arg(styleoptions != "" ? "true" : "false"); + " };\n").arg("google.maps.MapTypeId.TERRAIN") + .arg("false"); @@ -686,12 +671,6 @@ void RideMapWindow::createHtml() arg(maxLon,0,'g',GPS_COORD_TO_STRING); - if (styleoptions != "") { - currentPage += QString("" - " map.mapTypes.set('styled_map', styledMapType);\n" - " map.setMapTypeId('styled_map');\n"); - } - currentPage += QString("" // add the bike layer, useful in some areas, but coverage // is limited, US gets best coverage at this point (Summer 2011) @@ -813,8 +792,8 @@ RideMapWindow::drawShadedRoute() "polyline.on('mouseup', function(event) { map.dragging.enable();L.DomEvent.stopPropagation(event);webBridge.mouseup(); });\n" // setOptions ? "polyline.on('mouseover', function(event) { webBridge.hoverPath(event.latlng.lat, event.latlng.lng); });\n" "path = polyline.getLatLngs();\n" - "}\n").arg(styleoptions == "" ? color.name() : GColor(CPLOTMARKER).name()) - .arg(styleoptions == "" ? 0.5 : 1.0); + "}\n").arg(color.name()) + .arg(0.5); } else if (mapCombo->currentIndex() == GOOGLE) { // color the polyline code += QString("var polyOptions = {\n" @@ -824,8 +803,8 @@ RideMapWindow::drawShadedRoute() " zIndex: 0,\n" "}\n" "polyline.setOptions(polyOptions);\n" - "}\n").arg(styleoptions == "" ? color.name() : GColor(CPLOTMARKER).name()) - .arg(styleoptions == "" ? 0.5f : 1.0f); + "}\n").arg(color.name()) + .arg(0.5f); } view->page()->runJavaScript(code); @@ -1226,7 +1205,7 @@ MapWebBridge::drawOverlays() mw->createMarkers(); // overlay a shaded route - if (mw->getStyleOptions() == "") mw->drawShadedRoute(); + mw->drawShadedRoute(); // Get the latest new selection lap number. RideItem *rideItem = mw->property("ride").value(); diff --git a/src/Charts/RideMapWindow.h b/src/Charts/RideMapWindow.h index 1fc617d09..241f3d473 100644 --- a/src/Charts/RideMapWindow.h +++ b/src/Charts/RideMapWindow.h @@ -111,7 +111,6 @@ class RideMapWindow : public GcChartWindow Q_PROPERTY(bool showintervals READ showIntervals WRITE setShowIntervals USER true) Q_PROPERTY(int osmts READ osmTS WRITE setOsmTS USER true) Q_PROPERTY(QString googleKey READ googleKey WRITE setGoogleKey USER true) - Q_PROPERTY(QString styleoptions READ getStyleOptions WRITE setStyleOptions USER false) public: typedef enum { @@ -143,9 +142,6 @@ class RideMapWindow : public GcChartWindow setTileServerUrlForTileType(x); } - QString getStyleOptions() const { return styleoptions; } - void setStyleOptions(QString x) { styleoptions=x; } - QString googleKey() const { return gkey->text(); } void setGoogleKey(QString x) { gkey->setText(x); } @@ -172,7 +168,6 @@ class RideMapWindow : public GcChartWindow private: bool first; - QString styleoptions; QComboBox *mapCombo, *tileCombo; QCheckBox *showMarkersCk, *showFullPlotCk, *showInt; diff --git a/src/Resources/application.qrc b/src/Resources/application.qrc index 555377067..c891dd257 100644 --- a/src/Resources/application.qrc +++ b/src/Resources/application.qrc @@ -180,7 +180,6 @@ images/oxygen/down.png audio/lap.wav images/configure.png - web/googlemap/dark.css images/toolbar/cloud.png images/services/strava_compatible.png images/services/strava_connect.png