mezerotm / cmv

CMV is a citySDK based map visualizatoin tool
5 stars 5 forks source link

Legend and Map Need to be Hidden on Reload #45

Closed hardnett closed 7 years ago

hardnett commented 7 years ago

The current map legend and title of the map should be hidden when the submit button is pressed.

hardnett commented 7 years ago

This is fixed. But I had to do some funny looking code to access the control in the map. This may be the only way to do it, but it seems like there should be an alias for the b[0] syntax. I did not feel it was worth digging any deeper on now. It works.

// remove the title on reload
var titleControl = cmv.display.map.getActiveMap().googleMap.controls[google.maps.ControlPosition.TOP_CENTER];
// this concoction came from inspecting the debugger. There must be a more straight-forward way to do this (crh)
titleControl.b[0].style.display = "none"; // hide