You can fully implement Micrio in your website in just 2 steps:
Include Micrio into your project:
If you are using NodeJS, you can install the Micrio viewer using npm i @micrio/client. After that, on the page or within the component you need it, include import @micrio/client at the top of the file. This auto-binds Micrio to any <micr-io> elements you create.
If you want to use plain HTML, insert the following statement into your document <head>:
The Micrio client API
Using Micrio inside your own website
You can fully implement Micrio in your website in just 2 steps:
Include Micrio into your project:
If you are using NodeJS, you can install the Micrio viewer using
npm i @micrio/client
. After that, on the page or within the component you need it, includeimport @micrio/client
at the top of the file. This auto-binds Micrio to any<micr-io>
elements you create.If you want to use plain HTML, insert the following statement into your document
<head>
:Use the special Micrio
<micr-io>
HTML tag inside your document:This will place the image element and will auto-load all required data and any markers and tours you have created in the Micrio Dashboard.
You can style and place this element using basic CSS.
For any custom behavior, you can use this client API.
A simple example
yields in a zoomable Micrio image without any HTML controls:
To access this Micrio instance using JS, you can simply query the HTML element:
This yields a HTMLMicrioElement element, which can be immediately accessed.
For instance, to animate the camera to a certain viewport, let's add this button:
Using the API inside your own application
Using Javascript, you can simply follow this documentation and examples when creating any custom behavior with Micrio.
If you use TypeScript in your project, you can use the Micrio Declarations file micrio-5.1.min.d.ts!
Simply include the
d.ts
file in your project in a directory included in your project, and implement it:Author
Marcel Duin marcel@micr.io