viewFactory static method

Element viewFactory(
  1. int viewId, {
  2. Object? params,
})

Implementation

static web.Element viewFactory(int viewId, {Object? params}) {
  final channel =
      ChannelType.view.channelWithParamAndId(viewId, codec, registrar);
  final overlayChannel =
      ChannelType.overlay.channelWithParamAndId(viewId, codec, registrar);
  final webMapOption = WebMapOption.fromMessageable(params!);

  getController(viewId, webMapOption).then((webController) {
    KakaoMapWebController(
        controller: webController,
        channel: channel,
        overlayChannel: overlayChannel);
  });

  return web.HTMLDivElement()
    ..id = mapElementId(viewId)
    ..style.zIndex = '0'
    ..style.width = '100%'
    ..style.height = '100%';
}