import React, {Component} from 'react' import './ExamplePage.css' import "./CommonExample.css"; import {GIS} from "iclient3d-plot-diy"; ; import {Button} from "antd"; export default class ExampleI18nPage extends Component { constructor(props) { super(props); this.state = { htmlString: '

正在加载中...

' }; } toolbars = [ 'global', 'fullscreen', 'measureDistance', 'measureArea', 'seethrough', { key: 'seethrough2', icon: 'seethrough', titleI18n: 'seethrough2', handleClick: () => { alert('new toolbar') } }, ]; i18nObj = { seethrough2: { 'en-US': 'See Through2', 'zh-CN': '通视分析2', 'fr-FR': '通视分析2' } } componentDidMount() { fetch('./example/ExampleI18nPage.md') .then(response => response.text()) .then(mdText => { this.setState({htmlString: window.marked.parse(mdText)}); }); } render() { return (

多语言展示,语言切换,允许增加多语言Key

{ this.mapFunction = e } } mapRef={this} toolbars={this.toolbars} showDefaultLayer={true} i18nObj={this.i18nObj} language={'en-US'} />
) } }