Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
D
default2
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yuri Bondarenko
default2
Commits
0858877f
Commit
0858877f
authored
Dec 29, 2018
by
Yuri Bondarenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qwe
parent
aeeb9c75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
src/components/ymaps/index.js
src/components/ymaps/index.js
+7
-6
src/index.html
src/index.html
+1
-0
No files found.
src/components/ymaps/index.js
View file @
0858877f
...
...
@@ -23,12 +23,13 @@ export default class YMaps extends Component {
const
el
=
document
.
querySelector
(
this
.
props
.
selector
);
ymaps
.
load
(
'
//api-maps.yandex.ru/2.1/?lang=en_RU
'
).
then
(
maps
=>
{
this
.
state
.
mapInstance
=
new
maps
.
Map
(
el
,
{
center
:
[
parseFloat
(
this
.
props
.
lat
),
parseFloat
(
this
.
props
.
lon
)
]
});
})
.
catch
(
error
=>
console
.
log
(
'
Failed to load Yandex Maps
'
,
error
)
);
this
.
props
.
mapInstance
=
new
ymaps
.
Map
(
el
,
{
center
:
[
55.757
,
37.62233
],
zoom
:
11
}
);
}
...
...
src/index.html
View file @
0858877f
...
...
@@ -18,6 +18,7 @@
@@include( './components/ymaps/index.html' )
<script
src=
"https://api-maps.yandex.ru/2.1/?apikey=fa88ed96-7c2b-4d07-8e74-1ac86a9ac3fd&lang=ru_RU"
type=
"text/javascript"
></script>
<script
src=
"https://cdn.polyfill.io/v2/polyfill.js?features=default,fetch"
></script>
<script
src=
"/assets/js/app.js?@@rev"
></script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment