Home computickets Your label in Yandex Maps

Your label in Yandex Maps

Author

Date

Category

why not the label is displayed? The path to the picture is true. What is the error?

Link to documentation on the topic: http://api.yandex.ru/maps/doc/jsapi/1.x/dg/tasks/how-to-add-placemark.xml#placemark-style
Link to the site where you need to implement: http://fastnails.myjino.ru/kontakty

{literal}
& lt; div id = "ymaps-map-id_134337756174430647519" style = "width: 1020px; Height: 396px;" & gt; & lt; / div & gt;
& lt; script type = "text / javascript" & gt;
Function Fid_134337756174430647519 (YMAPS) {
  var map = new ymaps.map ("ymaps-map-id_134337756174430647519", {
    Center: [37.66324533754642, 55.84944941376199],
    Zoom: 16,
    Type: "Yandex # Map"
  });
  map.controls.
    .add ("zoomcontrol")
    .add ("MAPTOOLS")
    .add (new ymaps.control.typeselector (["Yandex # Map", "Yandex # Satellite", "Yandex # Hybrid", "Yandex # PublicMap"]));
  map.geoBjects.
   // Creates style
var s = new ymaps.style ();
// Creates a label icon style
s.iconstyle = new ymaps.iconstyle ();
s.iconstyle.href = "/uploads/images/fav.png";
s.iconstyle.size = new ymaps.point (18, 29);
s.iconstyle.offset = new ymaps.point (-9, -29);
var Placemark = New Ymaps.Placemark ([37.669215637163646, 55.85044779554645], {style: s});
map.addoverlay (placemark);
};
& lt; / script & gt;
& lt; script type = "text / javascript" src = "http://api-maps.yandex.ru/2.0/?coordOrder=longlat& ;load=package.full& ;Wizard=constructor& ;lang=ru-ru& fid_134337756174430647519 "& gt; & lt; / script & gt;
& lt ;! - This code block must be inserted into the part of the page where you want to post a map (end) - & gt;
{/ literal}

Answer 1

Use designer , after changing the size of the displayed card.


Answer 2

Because it works for Yandex API 1.x
And you connect the library 2.x

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions