1.0.1 • Published 2 years ago
cordova-plugin-addgeotagtoimage v1.0.1
Cordova GeoTag Image Plugin
This Cordova plugin allows you to add geographical location (latitude and longitude) as metadata to an image. It is designed to work with base64-encoded JPEG images.
Installation
Install the plugin into your Cordova project using the following command:
cordova plugin add cordova-plugin-addGeoTagToImageUsage
To use the plugin, you need to first call the addGeoTagToImage method. Here's an example of how to do it:
var addGeoTagToImage = cordova.plugins.addGeoTagToImage;
addGeoTagToImage.addGeoTagToImage(
base64ImageInput,
latitude,
longitude,
function(successResponse) {
// Handle updated image with geo tags
// successResponse will contain the base64-encoded image with added geo tags
},
function(errorResponse) {
// Handle error response from the plugin
// errorResponse will describe the error encountered
}
);Parameters
base64ImageInput: A base64-encoded JPEG image string.latitude: Latitude for the geotag.longitude: Longitude for the geotag.
Callbacks
successResponse: A callback function that is invoked upon successful addition of geo tags. It receives the updated image as a parameter.errorResponse: A callback function that is called in case of an error. It receives an error description as a parameter.
Platform Support
This plugin supports the following platforms:
- Cordova Android
License
This plugin is released under the MIT License. See the LICENSE file for more details.