maps://?q=LAT,LNG
geo:LAT,LNG
startExternalMap() { | |
if (this.location.latitude) { | |
this.platform.ready().then(() => { | |
Geolocation.getCurrentPosition().then((position) => { | |
// ios | |
if (this.platform.is('ios')) { | |
window.open('maps://?q=' + this.location.name + '&saddr=' + position.coords.latitude + ',' + position.coords.longitude + '&daddr=' + this.location.latitude + ',' + this.location.longitude, '_system'); | |
}; | |
// android | |
if (this.platform.is('android')) { |
def render | |
pdf = Prawn::Document | |
pdf.image StringIO.new(Base64.decode64(splitBase64(BASE64_IMAGE_GOES_HERE)[:data])), at: [10, cursor - 50], width: 200, height: 125 | |
end | |
def splitBase64(uri) | |
if uri.match(%r{^data:(.*?);(.*?),(.*)$}) | |
return { | |
type: $1, # "image/png" | |
encoder: $2, # "base64" |
(function($) { | |
$.fn.serializeFiles = function() { | |
var form = $(this), | |
formData = new FormData() | |
formParams = form.serializeArray(); | |
$.each(form.find('input[type="file"]'), function(i, tag) { | |
$.each($(tag)[0].files, function(i, file) { | |
formData.append(tag.name, file); | |
}); |