1

Can you please explain how to integrate the script like this:

<script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=constructor%3A1d532a41650954ba7f9ebe8975d9ebff1be172d29fb570d1b8c94fb9bfb45c66&amp;width=500&amp;height=720&amp;lang=ru_RU&amp;scroll=true"></script>

I want to have this script in the Blazor's component because I need to show the map on one page

Denphy
  • 13
  • 3

1 Answers1

0

You need to add this script tag in Page/_Layout.cshtml file in-order to use this script.

Wajeeh Hasan
  • 175
  • 1
  • 8
  • Thanks. And how can I call this script in the component? – Denphy Jun 01 '22 at 06:58
  • You dont have to call this script it will be injected into blazor application once your app startsup, if by calling you mean call some function from within this script? – Wajeeh Hasan Jun 01 '22 at 07:06
  • I put this script in index.html (cause I have Blazor Webassembly). This script should display the map but there is nothing when I'm starting project. – Denphy Jun 01 '22 at 07:09
  • [similar question for you](https://stackoverflow.com/questions/59524910/launch-google-maps-on-blazor) this one might help you have a look at this – Wajeeh Hasan Jun 01 '22 at 07:12