Skip to main content

Map Plugin

Map plugin allows you to insert googles maps component & customize it. Map plugin uses Google Maps API.

Add a Map to check it out!

Usage#

/* Editor */
import { RicosEditor } from 'ricos-editor';
import { pluginMap } from 'wix-rich-content-plugin-map';
<RicosEditor plugins={[pluginMap(MapConfig)]} />;
/* Viewer */
import { RicosViewer } from 'ricos-viewer';
import { pluginMap } from 'wix-rich-content-plugin-map/viewer';
<RicosViewer plugins={[pluginMap(MapConfig)]} />;

Map Config API#

googleMapApiKey#

googleMapApiKey: string;

Get your Google Maps API Key here

minWidth#

Control Map min width

minWidth?: number;

Default value:

minWidth: 100;

maxWidth#

Controls Map max width

maxWidth?: number;

Default value:

maxWidth: 740;

minHeight#

Controls Map min height

minHeight?: number;

Default value:

minHeight: 100;

maxHeight#

Controls Map max height

maxHeight?: number;

Default value:

maxHeight: 1000;

mapSettings#

Control Map settings

mapSettings?: {
address?: string,
locationDisplayName?: string,
lat?: number,
lng?: number,
zoom?: number,
mode?: string,
isMarkerShown?: boolean,
isZoomControlShown?: boolean,
isStreetViewControlShown?: boolean,
isDraggingAllowed?: boolean,
}
{
mode: 'roadmap' | 'sateline' | 'hybrid' | 'terrain'
}

Default value:

{
address: 'Wix HQ, Nemal Tel Aviv Street, Tel Aviv-Yafo, Israel',
locationDisplayName: 'Wix HQ, Nemal Tel Aviv Street, Tel Aviv-Yafo, Israel',
lat: 32.097235,
lng: 34.77427,
zoom: 18,
mode: 'roadmap',
isMarkerShown: true,
isZoomControlShown: true,
isStreetViewControlShown: true,
isDraggingAllowed: true,
}