J
J
Jack London2016-06-29 18:33:54
JavaScript
Jack London, 2016-06-29 18:33:54

How to set up maps on the site?

Created a test version on this site. I can’t launch the map at all, but when I press F12 (developer tools), when the modal window is open, the map immediately appears, what is the reason for this and why is the marker not centered? Thanks a lot in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
VsWeb, 2016-07-01
@Windhack

Try Yandex Maps

I
IceJOKER, 2016-06-29
@IceJOKER

https://developers.google.com/maps/documentation/j... - the first page of the tutorial on the official page and in Russian, can't you read it?
The first example shows that you need to use callback, you need to wait for the map to load.
And why did you first declare a global map variable, and then declare the same variable locally (if you need a global variable, then when assigning a variable, discard var .
first
and then
map = new ....;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question