10 AngularJS Google Maps Demos & Examples
From: https://www.angularjs4u.com/modules/5-angularjs-google-maps-demos/
.
.
1. Angular Directives for Google Maps
2. GM Simple Maps
3. Angular TODO Google Map Demo
4. Example of Angular Maps with Markers
5. Playing with Maps using AngularJS
6-10 – Please tell us below if you know any more good JavaScript demos of Google maps which we can add to this web page to help others.
Also if you are looking to code or have coded any features we are looking for include functionality for zooming the maps with mouse scrolling or by finger pinch (on mobile devices) we would love to hear about it. We’re also API integration such as real-time search custom markers and other similar geo-location features. In return we can offer you some exposure and usage/adoption to your module for free.
.
EPUBReader a lightweight HTML5 based ebook reader.
.
Welcome at EPUBReaders Homepage
.
The new free EPUBReader extension for Chrome is now available!
EPUBReader is a lightweight (< 1 MB) HTML5 based ebook reader.
✓ Reads ebooks in the EPUB format without DRM
✓ Opens the ebooks in memory at the location where they are stored, no extra space is required
✓ Uses the proven reading engine of the Firefox add-on EPUBReader (> 400,000 daily users)
✓ Works offline
✓ Is available in 24 languages
© 2009 EPUBReader | Design: styleshout
How To Make a Free 3D Cover Image of Your Book.
.
.
source: http://www.myebook.co.za/how-to-make-a-free-3d-cover-image-of-your-book
How To Make a Free 3D Cover Image of Your Book.
Looking to create a great-looking 3D cover image to help promote your latest book? Save yourself the time and money of having to hire someone to create this 3D cover image by spending just a few minutes and watching our latest YouTube tutorial that will walk you through the process step-by-step.
Why would you want a 3D image of your Book?
- As part of an attractive author email signature.
- As part of posts on your social media platforms like Facebook, Twitter and Google +.
- Helps to make great-looking book-banners.
- As marketing images directly on your author-website
Here is what you need
+ +
Part 1 - Download your favorite 3D Book template image
No prior software experience is needed to create the 3D image, this easy-to-understand online tutorial will walk you through each step of the process.
Firstly pick the 3D template that most suites your book-type:
Option 1
Standard large book template
Option 2
The spiral-bound book 3D template (Added June 29th 2016).
Option 3
The thin book 3D template (Added September 22nd 2016).
Option 4
The hard-cover book 3D template (Added June 2nd, 2017).
Part 2 - Access Pixlr: The free platform to create the simple 3D Book Image
This tutorial does not rely on Adobe Photoshop at all. Instead we will show you how to use the free online image editor found here; pixlr.com/editor/ to create the basic 3D image.
Part 3 - (Optional) Remove the background of the 3D book cover image using GIMP
I then use the free image-editing software called GIMP to touch up the image. (Download GIMP Here.)Please note, this step is entirely optional and will just polish the 3D cover-image further by removing the background "space".
YouTube not your thing?
Here is our step-by-step instructions on how to create your own 3D Cover image.
Step 1
First: Download your preferred 3D book image template file.
- Option 1: Standard 3D template.
- Option 2: Spiral-bound 3D template.
- Option 3: Thin 3D book template.
- Option 4: Hard-cover 3D template.
Step 2
(You will need to have the high-resolution image file of your Book cover ready.)
First: Open up the template image in Pixlr (Select the "Open image from Computer" option)
Second: Select: Layer - Open image as layer.
Then browse your PC and find, select and open the rectangular book cover image.
Third: Select: Edit - Free Distort.
Drag the corners of the book cover image to match the four corners of the 3D book template. When prompted if you want to save the update, click yes.
Fourth: Select: File - Save,
Save the image to your computer as a PNG file with an appropriate name For example: 3D-Book-Image-MyBookName.png
Hint: You might want to adjust the 3D image dimensions before saving the file, this is done through the following menu: Select the "Image" menu and then select "Image Size".
Congrats - You now have a professional-looking 3D image of your book cover!
I have deliberately left out the steps to tweak the image through GIMP. If you are more of a geek, please view the YouTube video demonstrating how to remove the background of the 3D image at the beginning of the article.
If you find this tutorial useful, please let me know, I would love to hear your feedback.
source: http://www.myebook.co.za/how-to-make-a-free-3d-cover-image-of-your-book
requestFileSystem() vs resolveLocalFileSystemURL()
.
When you get file system access using requestFileSystem, access is granted for the sandboxed file system only (the sandbox limits access to the app itself), not for general access to any file system location on the device. (read here for TEMPORARY and here for PERSISTENT storage tutorial)
To access file system locations outside the sandboxed storage, use other methods such as window.requestLocalFileSystemURL, which support platform-specific locations.
As of Cordova v1.2.0 (cordova-plugin-file), URLs to important file-system directories are provided. Each URL is in the form file:///path/to/spot/, and can be converted to a DirectoryEntry using window.resolveLocalFileSystemURL(). (read here)
.
Methods
requestFileSystem()
Requests a file system where data should be stored. You access a sandboxed file system by requesting a
LocalFileSystem
object using this global method, window.requestFileSystem()
.void requestFileSystem(
in unsigned short type,
in unsigned long long size,
in FileSystemCallback successCallback,
in ErrorCallback errorCallback
);
Parameters
- type
- The storage type of the file system. The values can be either
TEMPORARY
orPERSISTENT
. - size
- The storage space—in bytes—that you need for your app.
- successCallback
- The success callback that is called when the browser provides a file system. Its argument is the
FileSystem
object with two properties:
- name - the unique name assigned by the browser to the file system.
- root - the read-only
DirectoryEntry
object representing the root of the file system.
- opt_errorCallback
- The error callback that is called when errors happen or when the request to obtain the file system is denied. Its argument is the
FileError
object.
Returns
void
Exceptions
This method can raise an FileError with the following code:
Exception | Description |
---|---|
SECURITY_ERROR | The application does not have permission to access the file system interface. For example, you cannot run from file:// . For more details, see the article on basic concepts. |
resolveLocalFileSystemURL()
Lets you look up the entry for a file or directory with a local URL.
void resolveLocalFileSystemURL(
in DOMString url,
in EntryCallback successCallback,
in optional ErrorCallback errorCallback
);
Parameters
- url
- The URL of a local file in the file system.
- successCallback
- The success callback that is called when the browser provides the file or directory for the supplied URL.
- errorCallback
- The error callback that is called when errors happen or when the request to obtain the entry object is denied.
Returns
void
Exceptions
This method can raise an FileError with the following code:
Exception | Description |
---|---|
ENCODING_ERR | The syntax of the URL was invalid. |
NOT_FOUND_ERR | The URL was structurally correct, but refers to a resource that does not exist. |
SECURITY_ERR | The application does not have permission to access the file system interface. |
.
REFERENCE:
1. https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html
2. https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem
.
Ionic 1 Cordova Files (persistent)
Objective
1. To use window.requestFileSystem2. To use window.PERSISTENT type of storage
3. To implement file create, read, write and delete.
References
2. https://www.html5rocks.com/en/tutorials/file/filesystem/
3. Codes samples adapted from: https://www.tutorialspoint.com/cordova/cordova_file_system.htm
3. Codes samples adapted from: https://www.tutorialspoint.com/cordova/cordova_file_system.htm
0. Add Cordova
cordova plugin add cordova-plugin-file1. HTML View
<button ng-click="cdv('create-file')" class="button button-positive button-block">create-file</button><button ng-click="cdv('write-file')" class="button button-positive button-block">write-file</button>
<button ng-click="cdv('read-file')" class="button button-positive button-block">read-file</button>
<button ng-click="cdv('remove-file')" class="button button-positive button-block">remove-file</button>
2. JS Controller
// The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams,$ionicPlatform) {
$scope.cdvTasks = function (options) {
console.log('cdvTasks begin');
$ionicPlatform.ready(function() {
console.log('deviceReady');
/*cordova task begin*/
switch (options) {
case "create-file":
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback1, errorCallback1)
function successCallback1(fs) {
fs.root.getFile('log.txt', {
create: true,
exclusive: true
}, function(fileEntry) {
alert('File creation successfull!')
}, errorCallback1);
}
function errorCallback1(error) {
alert("ERROR: " + error.code)
}
break;
case "write-file":
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback2, errorCallback2)
function successCallback2(fs) {
fs.root.getFile('log.txt', {
create: true
}, function(fileEntry) {
fileEntry.createWriter(function(fileWriter) {
fileWriter.onwriteend = function(e) {
alert('Write completed.');
};
fileWriter.onerror = function(e) {
alert('Write failed: ' + e.toString());
};
var blob = new Blob(['Lorem Ipsum'], {
type: 'text/plain'
});
fileWriter.write(blob);
}, errorCallback2);
}, errorCallback2);
}
function errorCallback2(error) {
alert("ERROR: " + error.code)
}
break;
case "read-file":
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback3, errorCallback3)
function successCallback3(fs) {
fs.root.getFile('log.txt', {}, function(fileEntry) {
fileEntry.file(function(file) {
var reader = new FileReader();
reader.onloadend = function(e) {
alert(this.result);
};
reader.readAsText(file);
}, errorCallback3);
}, errorCallback3);
}
function errorCallback3(error) {
alert("ERROR: " + error.code)
}
break;
case "remove-file":
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, successCallback4, errorCallback4)
function successCallback4(fs) {
fs.root.getFile('log.txt', {
create: false
}, function(fileEntry) {
fileEntry.remove(function() {
alert('File removed.');
}, errorCallback4);
}, errorCallback4);
}
function errorCallback4(error) {
alert("ERROR: " + error.code)
}
break;
} /*switch*/
function cdvFail(error) {
alert("ERROR: " + error.code)
}
/*cordova task end*/
});/*device ready*/
}/*app task*/
}
Ionic 1 Cordova Files (temporary)
Objective
1. To use window.requestFileSystem2. To use window.TEMPORARY type of storage
3. To implement file create, read, write and delete.
References
0. Add Cordova
cordova plugin add cordova-plugin-file1. HTML View
<button ng-click="cdv('create-file')" class="button button-positive button-block">create-file</button><button ng-click="cdv('write-file')" class="button button-positive button-block">write-file</button>
<button ng-click="cdv('read-file')" class="button button-positive button-block">read-file</button>
<button ng-click="cdv('remove-file')" class="button button-positive button-block">remove-file</button>
2. JS Controller
function ($scope, $stateParams,$ionicPlatform) {
$scope.cdv = function (options) {
console.log('cordova plugins');
$ionicPlatform.ready(function() {
console.log('deviceReady');
/*cordova task begin*/
switch (options) {
case "create-file":
var type1 = window.TEMPORARY;
var size1 = 5 * 1024 * 1024;
window.requestFileSystem(type1, size1, successCallback1, errorCallback1)
function successCallback1(fs) {
fs.root.getFile('log.txt', {
create: true,
exclusive: true
}, function(fileEntry) {
alert('File creation successfull!')
}, errorCallback1);
}
function errorCallback1(error) {
alert("ERROR: " + error.code)
}
break;
case "write-file":
var type2 = window.TEMPORARY;
var size2 = 5 * 1024 * 1024;
window.requestFileSystem(type2, size2, successCallback2, errorCallback2)
function successCallback2(fs) {
fs.root.getFile('log.txt', {
create: true
}, function(fileEntry) {
fileEntry.createWriter(function(fileWriter) {
fileWriter.onwriteend = function(e) {
alert('Write completed.');
};
fileWriter.onerror = function(e) {
alert('Write failed: ' + e.toString());
};
var blob = new Blob(['Lorem Ipsum'], {
type: 'text/plain'
});
fileWriter.write(blob);
}, errorCallback2);
}, errorCallback2);
}
function errorCallback2(error) {
alert("ERROR: " + error.code)
}
break;
case "read-file":
var type3 = window.TEMPORARY;
var size3 = 5 * 1024 * 1024;
window.requestFileSystem(type3, size3, successCallback3, errorCallback3)
function successCallback3(fs) {
fs.root.getFile('log.txt', {}, function(fileEntry) {
fileEntry.file(function(file) {
var reader = new FileReader();
reader.onloadend = function(e) {
alert(this.result);
};
reader.readAsText(file);
}, errorCallback3);
}, errorCallback3);
}
function errorCallback3(error) {
alert("ERROR: " + error.code)
}
break;
case "remove-file":
var type = window.TEMPORARY;
var size = 5 * 1024 * 1024;
window.requestFileSystem(type, size, successCallback4, errorCallback4)
function successCallback4(fs) {
fs.root.getFile('log.txt', {
create: false
}, function(fileEntry) {
fileEntry.remove(function() {
alert('File removed.');
}, errorCallback4);
}, errorCallback4);
}
function errorCallback4(error) {
alert("ERROR: " + error.code)
}
break;
} /*switch*/
function cdvFail(error) {
alert("ERROR: " + error.code)
}
/*cordova task end*/
});/*device ready*/
}/*app task*/
}
NOTE:
List of Error Codes and Meanings
When an error is thrown, one of the following codes will be used.
Code | Constant |
---|---|
1 | NOT_FOUND_ERR |
2 | SECURITY_ERR |
3 | ABORT_ERR |
4 | NOT_READABLE_ERR |
5 | ENCODING_ERR |
6 | NO_MODIFICATION_ALLOWED_ERR |
7 | INVALID_STATE_ERR |
8 | SYNTAX_ERR |
9 | INVALID_MODIFICATION_ERR |
10 | QUOTA_EXCEEDED_ERR |
11 | TYPE_MISMATCH_ERR |
12 | PATH_EXISTS_ERR |
Subscribe to:
Posts (Atom)
Follow Us
Were this world an endless plain, and by sailing eastward we could for ever reach new distances