jenkins-bot has submitted this change and it was merged. Change subject: Use circle markers in coordinate result browser ......................................................................
Use circle markers in coordinate result browser These faster to render, allowing more points to be rendered. Change-Id: I68d5137d1072dc468ca9f8116700d6ab429c5936 --- M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 1 file changed, 10 insertions(+), 2 deletions(-) Approvals: Smalyshev: Looks good to me, approved Jonas Kress (WMDE): Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js index 09445f0..95e3dc2 100644 --- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js +++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js @@ -95,13 +95,21 @@ } if( field.datatype === MAP_DATATYPE ){ var longLat = self._extractLongLat( field.value ); - if( !longLat[0] || !longLat[1] ){ + + // FIXME: if the coordinates are for another globe (e.g. Mars), + // then the array order is different and longLat[0] is NaN. + if( !longLat[0] || !longLat[1] || isNaN( longLat[0] ) ){ return true; } var info = self._getItemDescription( rowKey ); markers.push( - L.marker( [ longLat[0], longLat[1] ] ).bindPopup( info[0] ) + L.circle( [ longLat[0], longLat[1] ], 50, { + color: '#e04545', + opacity: 0.9, + fillColor: '#e04545', + fillOpacity: 0.9 + } ).bindPopup( info[0] ) ); } } ); -- To view, visit https://gerrit.wikimedia.org/r/275866 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68d5137d1072dc468ca9f8116700d6ab429c5936 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits