Google Maps Jquery

I am trying to make this work:
http://help.skuid.com/m/supercharge-your-ui/l/601103-using-the-custom-component-for-custom-page-beha…

Here is what I think it should look like:

skuid.componentType.register(‘mapAddress’,function(element){
var btn = jQuery(‘Map Address’).button()

.on(‘click’,function(){

// instantiate a model using the model named “Contacts”

var m = skuid.model.getModel(‘View_Location’);

// get the first row (or record) from our model

var row = m.getFirstRow();

// assemble the mailing address fields

var street = m.getFieldValue(row,’{{$Model.View_Location.data.0.Street_Address__c}}’);

var city = m.getFieldValue(row,’{{$Model.View_Location.data.0.Zip_Postal__r.City__r.City__c}}’);

var state = m.getFieldValue(row,’{{$Model.View_Location.data.0.Zip_Postal__rState__r.State_Name__c}}’);

var zip = m.getFieldValue(row,’{{$Model.View_Location.data.0.Zip_Postal__r.Zip_Codes__c}}’);

var address = street + ’ ’ + city + ', ’ + state + ’ ’ + zip;

window.open(‘http://maps.google.com/?q=’ + address,’_blank’,‘height=750,width=1100,status=0,menubar=0’);

});

element.append(btn);
});

Are you attempting to make it into a custom component or are you wanting to make it the Javascript on each page?

Is it not working for you?