Download the PHP package webmapp/wm-osmfeatures without Composer

On this page you can find all versions of the php package webmapp/wm-osmfeatures. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wm-osmfeatures

Package Documentation: WmOsmfeatures

Introduction

The WmOsmfeatures package facilitates synchronization with OpenStreetMap (OSM) features, allowing for seamless integration of OSM data into your Laravel application. This documentation provides an overview of the package's functionality, usage, and integration.

Features

Installation

To install the WmOsmfeatures package, follow these steps:

  1. Install the package via Composer:

  2. Configure your models to use the provided traits and interfaces.

Usage

Setting Up Models

To enable synchronization with OSM features, follow these steps:

  1. Implement the OsmfeaturesSyncableInterface interface in your model.
  2. Use the OsmfeaturesSyncableTrait trait in your model.

Example:

Configuration

In your model, implement the following methods from the OsmfeaturesSyncableInterface interface:

Example:

Also make sure to add osmfeatures columns to fillable attributes in your model.

Synchronization

To synchronize OSM features with your local database, you have two options:

  1. Automatic Synchronization: Use the provided Artisan command wm-osmfeatures:sync to automatically synchronize all initialized models. This command prepares the models and starts the sync process for each one, pushing sync jobs to the queue.

    Alternatively you can provide a option to perform the sync only for the specified model

  2. Manual Import: Manually import records from OSM features to the local database using the wm-osmfeatures:import-first command. This command takes a model and a file path as arguments and dispatches sync jobs for the specified model based on the osmfeatures IDs provided in the file.

    The file must be in .txt format and should contain a list of osmfeatures IDs, each formatted as follows: XYYYYY, where X can be N, W, or R, and Y is a number greater than 0.

    Example:

    Additionally, you can use the wm-osmfeatures:import-sync command to manually trigger the sync process for all initialized models. This command iterates over each model and starts the import process fetching data from osmfeatures API using osmfeatures_id of each model.

    Note: The manual import commands are only available for models that implement the OsmfeaturesImportableTrait. Make sure to include the OsmfeaturesImportableTrait trait in your model as follows:

How the OsmfeaturesSyncJob works

The OsmfeaturesSyncJob class is responsible for synchronizing OSM features with your local database. It makes a call to the OSM features API and uses the osmfeaturesUpdateLocalAfterSync(string $osmfeaturesId) method defined in your model interface to update the local database with the new data. The OsmfeaturesSyncJob class runs in the background and synchronizes OSM features with your local database using the methods defined in the OsmfeaturesSyncableInterface.

Conclusion

The WmOsmfeatures package simplifies the integration of OSM features into your Laravel application, providing seamless synchronization and data management capabilities. By following the provided guidelines, you can efficiently incorporate OSM data into your project and leverage its benefits.

For more information and detailed usage instructions, refer to the package documentation and source code.

Support and Feedback

For support and feedback regarding the WmOsmfeatures package, please contact the package maintainers or open an issue on the GitHub repository. We appreciate any feedback and contributions to improve the package and its functionality.


All versions of wm-osmfeatures with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0||^11.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webmapp/wm-osmfeatures contains the following files

Loading the files please wait ....