none
How to get Default Right Click context menu in V8 web control RRS feed

  • Question

  • When I right click on either Bing maps or Google maps I get useful  information like the address etc of the location.

    In my app the right click functionality is gone.  How can I get the default context menu back?  Seems silly to try to recreate the default context menu when it already exists.  I do NOT want to recreate this from scratch.

    The app is an upgrade from the Mappoint program.  Customer Geolocation, Routing, Sequencing etc

    Thanks for any info pointing to the solution

    See below for my answer to this problem.  Now you can expand on it.

    inside the GetMap function

                Microsoft.Maps.Events.addHandler(map, 'rightclick', function(e){
                    GetAddress(e)
                    });

    function GetAddress(coordinate) {
                if (!searchManager) {
                    //Create an instance of the search manager and call the geocodeQuery function again.
                    Microsoft.Maps.loadModule('Microsoft.Maps.Search', function () {
                        searchManager = new Microsoft.Maps.Search.SearchManager(map);
                        GetAddress(coordinate);
                    });
                } else {
                    searchManager.reverseGeocode({ location: coordinate.location, callback: ReverseGeocodeCallback });
                }
            }

    • Edited by VFPrules Thursday, February 22, 2018 6:15 PM To help the next person
    Tuesday, January 16, 2018 4:32 PM

Answers

All replies