Git Product home page Git Product logo

motorcortex-ol's Introduction

MotorCortex-Openlayers

Table of Contents

Demo

Check it out here

Intro / Features

MotorCortex Openlayers takes the capabilities of Openlayers library of creating a dynamic map in any web page. The library exposes a Map Clip with the name Clip which will initialize an Openlayer Map instance where you can add animation with the "GoTo" Incident.

This Plugin exposes two Incident:

  • Map Clip
  • GoTo

Getting Started

Installation

$ npm install @donkeyclip/motorcortex-ol
# OR
$ yarn add @donkeyclip/motorcortex-ol

Importing and loading

import { loadPlugin } from "@donkeyclip/motorcortex";
import MapsDef from "@donkeyclip/motorcortex-ol";
const Maps = loadPlugin(MapsDef);

Creating Incidents

Map Clip

const london = MapsDef.utils.fromLonLat([-0.12755, 51.507222]);
const bern = MapsDef.utils.fromLonLat([7.4458, 46.95]);

const clip = new Maps.Clip(
  {
    parameters: {
      view: { center: london, zoom: 8 }
    }
  },
  {
    host: document.getElementById("clip"),
    containerParams: { width: "1280px", height: "720px" }
  }
);

Map Clip Attrs

Map Clip take as a parameter a view object. This object contains the starting point (center) and the zoom number. The center value has the following structure:

center: MapsDef.utils.fromLonLat([-0.12755, 51.507222])

GoTo

const gotoBern = new Maps.GoTo(
  {
    animatedAttrs: {
      goto: {
        zoom: 3,
        center: bern
      }
    }
  },
  { duration: 4000, selector: "!#olmap" }
);

GoTo Attrs

Goto Incident take as an attribute a goto object.This object contains the ending point (center) and the zoom number.

IMPORTANT

Along with the attributes, all GoTo incidents must take on their props the selector key with the value: !#olmap

Adding Incidents in your clip

mapsClipName.addIncident(incidentGoToName,startTime);

Contributing

In general, we follow the "fork-and-pull" Git workflow, so if you want to submit patches and additions you should follow the next steps:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that we can review your changes

License

MIT License

Sponsored by

motorcortex-ol's People

Contributors

alexdor avatar dependabot[bot] avatar elisavetampatzidou avatar github-actions[bot] avatar ivanvl01 avatar kissmybutton-bot avatar prieston avatar renovate-bot avatar renovate[bot] avatar

Watchers

 avatar  avatar  avatar

motorcortex-ol's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm eslint-plugin-node Available
npm rollup-plugin-babel Available
npm rollup-plugin-commonjs Unavailable
npm rollup-plugin-terser Available

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update actions/setup-node action to v3.8.2
  • chore(deps): update dependency caniuse-lite to v1.0.30001660
  • chore(deps): update dependency style-loader to v3.3.4
  • chore(deps): update dependency webpack-dev-server to v4.15.2
  • chore(deps): update googlecloudplatform/release-please-action action to v3.7.13
  • chore(deps): update babel monorepo (@babel/cli, @babel/core, @babel/eslint-parser, @babel/plugin-syntax-jsx, @babel/plugin-transform-react-jsx, @babel/preset-env)
  • chore(deps): update dependency @donkeyclip/motorcortex to v9.17.1
  • chore(deps): update dependency browserslist to v4.23.3
  • chore(deps): update dependency core-js to v3.38.1
  • chore(deps): update dependency css-loader to v6.11.0
  • chore(deps): update dependency eslint to v8.57.0
  • chore(deps): update dependency eslint-plugin-import to v2.30.0
  • chore(deps): update dependency eslint-plugin-promise to v6.6.0
  • chore(deps): update dependency tslib to v2.7.0
  • chore(deps): update reviewdog/action-eslint action to v1.31.0
  • chore(deps): update actions/setup-node action to v4
  • chore(deps): update dependency @rollup/plugin-commonjs to v26
  • chore(deps): update dependency concurrently to v9
  • chore(deps): update dependency css-loader to v7
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency eslint-plugin-promise to v7
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency prettier to v3
  • chore(deps): update dependency rimraf to v6
  • chore(deps): update dependency rollup to v4
  • chore(deps): update dependency style-loader to v4
  • chore(deps): update dependency webpack-dev-server to v5
  • chore(deps): update googlecloudplatform/release-please-action action to v4
  • chore(deps): update peaceiris/actions-gh-pages action to v4
  • chore(deps): update peter-evans/create-pull-request action to v7
  • fix(deps): update dependency ol to v10
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/bundle-size.yml
  • actions/checkout v3.6.0
  • actions/setup-node v3.8.1
  • pkg-size/action v1
.github/workflows/eslint.yml
  • actions/checkout v3.6.0
  • reviewdog/action-eslint v1.20.0
.github/workflows/github-page.yml
  • actions/checkout v3.6.0
  • actions/setup-node v3.8.1
  • peaceiris/actions-gh-pages v3.9.3
.github/workflows/misspell.yml
  • actions/checkout v3.6.0
  • sobolevn/misspell-fixer-action 0.1.0
  • peter-evans/create-pull-request v4.2.4
.github/workflows/release-please.yml
  • actions/checkout v3.6.0
  • GoogleCloudPlatform/release-please-action v3.7.12
  • actions/checkout v3.6.0
  • actions/setup-node v3.8.1
.github/workflows/test.yaml
  • actions/checkout v3.6.0
  • actions/setup-node v3.8.1
npm
package.json
  • ol ^6.13.0
  • @babel/cli 7.23.0
  • @babel/core 7.23.0
  • @babel/eslint-parser 7.22.15
  • @babel/plugin-syntax-jsx 7.22.5
  • @babel/plugin-transform-react-jsx 7.22.15
  • @babel/preset-env 7.22.20
  • @donkeyclip/motorcortex 9.12.0
  • @donkeyclip/motorcortex-player 2.10.11
  • @rollup/plugin-babel 5.3.1
  • @rollup/plugin-commonjs 22.0.2
  • @rollup/plugin-json 4.1.0
  • @rollup/plugin-node-resolve 13.3.0
  • babel-loader 8.3.0
  • browserslist 4.22.1
  • caniuse-lite 1.0.30001546
  • concurrently 7.6.0
  • core-js 3.33.0
  • css-loader 6.8.1
  • eslint 8.51.0
  • eslint-config-prettier 8.10.0
  • eslint-plugin-babel 5.3.1
  • eslint-plugin-import 2.28.1
  • eslint-plugin-node 11.1.0
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-promise 6.1.1
  • husky 8.0.3
  • lint-staged 13.3.0
  • prettier 2.8.8
  • rimraf 3.0.2
  • rollup 2.79.1
  • rollup-plugin-babel 4.4.0
  • rollup-plugin-cleanup 3.2.1
  • rollup-plugin-commonjs 10.1.0
  • rollup-plugin-terser 7.0.2
  • style-loader 3.3.3
  • tslib 2.6.2
  • webpack 5.88.2
  • webpack-cli 4.10.0
  • webpack-dev-server 4.15.1
  • node >=12

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>whitesource/merge-confidence:beta)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.