T
T
TANK_IST2015-07-27 07:44:13
JavaScript
TANK_IST, 2015-07-27 07:44:13

How to disable mobile balloon on ios?

Create a map with code

var myMap;
    ymaps.ready(function(){
      myMap = new ymaps.Map('map', {
        center: mapPos,
        zoom: 13,
        behaviors: ['default', 'scrollZoom'],
        controls: []
      });

      myPlacemark = new ymaps.Placemark([55.746831, 37.638108], {
            balloonContent: '<div id="map-balloon"></div>'
        },{
          iconImageSize: [0, 0],  
        iconImageOffset: [0, 0],
          balloonLayout: "default#imageWithContent",
        	balloonImageHref: '/',
          balloonContentSize: [480, 112],
          balloonImageOffset: [-240, -115],
          balloonImageSize: [480, 112],
          balloonShadow: false
      });

        myMap.geoObjects.add(myPlacemark);

        myPlacemark.balloon.open();
    });

Here's what's on desktop and android prntscr.com/7xff1q , here's what's on ios prntscr.com/7xfeqz - how to fix it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mak Alexey, 2015-08-04
@S-ed

Here is an example of a custom balloon on YMaps (I checked it, it works fine on Safari under iOS):
https://tech.yandex.ru/maps/jsbox/2.1/multiroute_c...
There are also some more useful examples.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question