jenkins-bot has submitted this change and it was merged. Change subject: Switch to geojson for geoshapes srv ......................................................................
Switch to geojson for geoshapes srv For now, use geojson instead of topojson. 4x traffic cost :( Bug: T144777 Change-Id: I5cf223c3c5292c68139bd67825a7c96b7a76378f --- M modules/box/Map.js 1 file changed, 11 insertions(+), 5 deletions(-) Approvals: Dereckson: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/box/Map.js b/modules/box/Map.js index 97edacd..8df0a2b 100644 --- a/modules/box/Map.js +++ b/modules/box/Map.js @@ -242,14 +242,20 @@ uri.port = undefined; uri.path = '/geoshape'; uri.query.origin = location.protocol + '//' + location.host; + // HACK: workaround for T144777 + uri.query.getgeojson = 1; return $.getJSON( uri.toString() ).then( function ( geoshape ) { delete data.href; - data.type = 'FeatureCollection'; - data.features = []; - $.each( geoshape.objects, function ( key ) { - data.features.push( topojson.feature( geoshape, geoshape.objects[ key ] ) ); - } ); + + // HACK: workaround for T144777 - we should be using topojson instead + $.extend( data, geoshape ); + + // data.type = 'FeatureCollection'; + // data.features = []; + // $.each( geoshape.objects, function ( key ) { + // data.features.push( topojson.feature( geoshape, geoshape.objects[ key ] ) ); + // } ); } ); default: -- To view, visit https://gerrit.wikimedia.org/r/309481 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5cf223c3c5292c68139bd67825a7c96b7a76378f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: wmf/1.28.0-wmf.18 Gerrit-Owner: Yurik <yu...@wikimedia.org> Gerrit-Reviewer: Dereckson <dereck...@espace-win.org> Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits