Skip to content

Instantly share code, notes, and snippets.

@handleman
Forked from matellis/gmaps_controls_classifier.js
Last active August 29, 2015 14:10
Show Gist options
  • Save handleman/491a92fbd9999539e3ac to your computer and use it in GitHub Desktop.
Save handleman/491a92fbd9999539e3ac to your computer and use it in GitHub Desktop.
hack to give classes on goole map interface elements
controlList = {
'map_type_control': 'margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; z-index: 11; position: absolute; cursor: pointer; right: 0px; top: 0px; ',
'pan_control': 'cursor: url(https://maps-api-ssl.google.com/intl/en_us/mapfiles/openhand_8_8.cur), default; width: 78px; height: 78px; position: absolute; left: 0px; top: 0px; ',
'zoom_control': 'position: absolute; left: 27px; top: 128px; ',
'streetmap_control': 'width: 32px; height: 38px; overflow-x: hidden; overflow-y: hidden; position: absolute; left: 0px; top: 0px; ',
};
function labelControls() {
$.each(controlList, function(id, attr) {
$('div[style^="' + attr + '"]').attr('class',id);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment