none
how to set bing map center to a fix co-ordinate which must not change on map zoom in and zoom out events? RRS feed

  • Question

  • I have created bing map on my page and showing one pushpin on the center of map.
    But as I change the zoom level map center co-ordinates gets change and the pushpin shifts from its actual location.
     here is my code:
                        var location = new Microsoft.Maps.Location(lat, lon);
                        var pushpin = new Microsoft.Maps.Pushpin(location, { icon: '/Images/ico/marker.png', width: 45, height: 45, draggable: false });
                        PinLayer.push(pushpin);

                        var options = _map.getOptions();
                        options.zoom = 19;
                        _map.setView(options);
    I am getting location co-ordinates from google geocoder and at that point i am creating the pin and setting the same as bing map center co-ordinate.

    so is there any way to keep the map center co-ordinates fixed with zoom in /zoom out events.

    Friday, March 18, 2016 10:25 AM

Answers