This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// delete a record | |
[client deleteRecord:@"recordID" | |
inLayer:@"com.simplegeo.example" | |
callback:[SGCallback callbackWithSuccessBlock: | |
^(id response) { | |
// deletion confirmed | |
} failureBlock:^(NSError *error) { | |
// deletion failed | |
}]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add or update many records at once | |
[client addOrUpdateRecords:records // an array of records | |
inLayer:@"com.simplegeo.example" | |
callback:[SGCallback callbackWithSuccessBlock: | |
^(id response) { | |
// additions/updates confirmed | |
} failureBlock:^(NSError *error) { | |
// additions/updates failed | |
}]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add or update a record | |
SGStoredRecord *record = [SGStoredRecord recordWithID:@"recordID" | |
point:[SGPoint pointWithLat:37.772445 lon:-122.405913] | |
layer:@"com.simplegeo.example"]; | |
[record setCreated:date]; // optional | |
[record setProperties:propertiesDictionary]; // optional | |
[client addOrUpdateRecord:record |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get a list of feature & place categories | |
[client getCategoriesWithCallback:[SGCallback callbackWithSuccessBlock: | |
^(id response) { | |
// you've got categories! | |
} failureBlock:^(NSError *error) { | |
// handle failure | |
}]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// annotate a feature | |
[client annotateFeature:@"SG_7L9nQHjsporBjZUz8KVt5t" | |
withAnnotation:annotationDictionary | |
isPrivate:NO | |
callback:[SGCallback callbackWithSuccessBlock: | |
^(id response) { | |
// annotation confirmed | |
} failureBlock:^(NSError *error) { | |
// annotation failed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get a annotations for a feature | |
[client getAnnotationsForFeature:@"SG_7L9nQHjsporBjZUz8KVt5t" | |
callback:[SGCallback callbackWithSuccessBlock: | |
^(id response) { | |
// you've got a annotations! | |
} failureBlock:^(NSError *error) { | |
// handle failure | |
}]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get a SimpleGeo feature | |
[client getFeatureWithHandle:@"SG_7L9nQHjsporBjZUz8KVt5t" | |
zoom:nil // polygon complexity (optional) | |
callback:[SGCallback callbackWithSuccessBlock: | |
^(id response) { | |
// you've got a feature! | |
// to create an SGFeature object... | |
SGFeature *feature = [SGFeature featureWithGeoJSON:response]; | |
} failureBlock:^(NSError *error) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(".vote").click( function() { | |
var votes = $(this).parent().find('.vote_num').attr('votes'); | |
$.post( | |
'{% url vote %}', { | |
"id":this.id, | |
}, function(data) {}); | |
this.className = "voted"; | |
votes = parseInt(votes) + 1; | |
$(this).parent().find('.vote_num').text(votes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family:'DSDotsMedium'; | |
src:url('/static/roommanager_assets/font/dsdots-webfont.svg#webfontUp10bL9H') format('svg'), url('/static/roommanager_assets/font/dsdots-webfont.eot?') format('eot'), url('/static/roommanager_assets/font/dsdots-webfont.woff') format('woff'), url('/static/roommanager_assets/font/dsdots-webfont.ttf') format('truetype'); | |
font-weight:normal; | |
font-style:normal; | |
} | |
#songboard { | |
font-family:'DSDotsMedium', Helvetica, Arial, sans-serif; | |
color:#dbcb98; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var v = 0, | |
q = [], | |
o = {}, | |
s = {}, | |
A = { | |
"<": "lt", | |
">": "gt", | |
"&": "amp", | |
'"': "quot", |