Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275866

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/66/275866/1

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: newchange
Gerrit-Change-Id: I68d5137d1072dc468ca9f8116700d6ab429c5936
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude <aude.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to