washingtonstateuniversity / WSU-mapping

This provides maping for all campus locations
GNU General Public License v3.0
1 stars 0 forks source link

deprecate the title in the content block of the feed #10

Open quantumJLBass opened 9 years ago

quantumJLBass commented 9 years ago

It really shouldn't be there, we can build it in the app and we already pass the title over in the feed. All that would need to happen is that the apps using the feed would change to build the title, and prepend it to the content block to match what it currently outputs like.

Example:

from :

 { "id":"3", "gamedayparkingpercentfull":"", "position":{ "latitude":"46.7312060639614", "longitude":"-117.170731607934" }, "summary":"Civil and environmental engineering research facility", "title":"Albrook (ALBR)", "style":{ "icon":"null" }, "info":{ "content":[ { "block":"<h2 class='header'>Albrook (ALBR)</h2><p>The Albrook Hydraulics Lab building provides research facilities for civil and environmental engineering projects that involve modeling the behavior and effects of water--for instance, planning bridges and evaluating dams.</p>", "title":"Overview" }, { "block":"<h2 class='header'>Albrook (ALBR)</h2><ul><li><strong>Major Labs/Facilities</strong><span>Water Research Center</span></li></ul>", "title":"What's Here" }], "title":"Albrook" }, "shapes": [ { "name":"Albrook", "encoded":"ief|Gt}cjUCg@@?IuAl@IBJLABb@LCBf@EBBb@O@?La@FCMQB", "style":{"events":{"rest":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0","onEnd":"close_toolTips();"},"mouseover":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0","onEnd":"open_toolTip(jObj,i)"},"click":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0","onEnd":"open_info(jObj,i)"},"dblclick":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0"}}}, "type":"polygon" }] }

to:

 { "id":"3", "gamedayparkingpercentfull":"", "position":{ "latitude":"46.7312060639614", "longitude":"-117.170731607934" }, "summary":"Civil and environmental engineering research facility", "title":"Albrook (ALBR)", "style":{ "icon":"null" }, "info":{ "content":[ { "block":"<p>The Albrook Hydraulics Lab building provides research facilities for civil and environmental engineering projects that involve modeling the behavior and effects of water--for instance, planning bridges and evaluating dams.</p>", "title":"Overview" }, { "block":"<ul><li><strong>Major Labs/Facilities</strong><span>Water Research Center</span></li></ul>", "title":"What's Here" }], "title":"Albrook" }, "shapes": [ { "name":"Albrook", "encoded":"ief|Gt}cjUCg@@?IuAl@IBJLABb@LCBf@EBBb@O@?La@FCMQB", "style":{"events":{"rest":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0","onEnd":"close_toolTips();"},"mouseover":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0","onEnd":"open_toolTip(jObj,i)"},"click":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0","onEnd":"open_info(jObj,i)"},"dblclick":{"fillOpacity":"0","strokeOpacity":"0","strokeWeight":"0"}}}, "type":"polygon" }] }

The <h2 class='header'>Albrook (ALBR)</h2> is removed from both blocks as there is already "title":"Albrook (ALBR)" so it's pointless and binding to leave it that way. If we need to change the title format _( which on the central map we do )_ we are stuck filtering first them rebuilding. This change also means that the feed packets are lighter over all too. Win win