locked
Bing Maps v8 API RRS feed

  • Question

  • I have been using this code in v7 to find the mouse position but this does not seem to work in v8.  I cannot find a replacement togetX and getY.  Can anybody help me with the correct syntax?

    point = new MM.Point(e.getX(), e.getY());
    mlatlng = e.target.tryPixelToLocation(point);
    updatemouse(mlatlng);

    .....update centre etc.

    Thanks

    Wednesday, April 6, 2016 7:21 PM

Answers

  • This is not yet implemented. We plan to have this added in before taking V8 out of preview.

    http://rbrundritt.wordpress.com

    Thursday, April 7, 2016 12:16 AM
  • To be honest that would take a lot of time to do and be difficult to maintain. As it is only about 2/3rds of the new API is documented. Most of the focus is currently on developing the new API.

    http://rbrundritt.wordpress.com

    • Marked as answer by MJD394 Friday, April 8, 2016 8:24 AM
    Thursday, April 7, 2016 4:20 PM
  • Taking a quick look, if the event is on the map, the event currently has a point and location properties. The point property contains the pixel information and the location property contains the map location coordinates. Looks like V8 doesn't require you to convert the pixel coordinates anymore to get the pixel information. Try modifying your code to the following:

    updatemouse(e.location);
    I like this new feature, but will still try and have the getX/getY methods added for backwards compatibility. We will also document the new event properties in the near future (lots of things to document still).


    http://rbrundritt.wordpress.com

    Friday, April 8, 2016 4:10 PM
  • Update: getX/getY is now supported by the mouseEventArgs object.

    [Blog] [twitter] [LinkedIn]

    Wednesday, April 27, 2016 11:55 PM

All replies

  • This is not yet implemented. We plan to have this added in before taking V8 out of preview.

    http://rbrundritt.wordpress.com

    Thursday, April 7, 2016 12:16 AM
  • Thanks for this.  It would help if Microsoft could list all the features and methods that do not work on this release.

    Also they could announce when a fully working version of the AOI is available so we can test it properly.

    Thursday, April 7, 2016 7:57 AM
  • To be honest that would take a lot of time to do and be difficult to maintain. As it is only about 2/3rds of the new API is documented. Most of the focus is currently on developing the new API.

    http://rbrundritt.wordpress.com

    • Marked as answer by MJD394 Friday, April 8, 2016 8:24 AM
    Thursday, April 7, 2016 4:20 PM
  • Thanks. Is there another way to get the mouse position which does work in v8?  I am keen to try out the new version.
    Friday, April 8, 2016 1:39 PM
  • Taking a quick look, if the event is on the map, the event currently has a point and location properties. The point property contains the pixel information and the location property contains the map location coordinates. Looks like V8 doesn't require you to convert the pixel coordinates anymore to get the pixel information. Try modifying your code to the following:

    updatemouse(e.location);
    I like this new feature, but will still try and have the getX/getY methods added for backwards compatibility. We will also document the new event properties in the near future (lots of things to document still).


    http://rbrundritt.wordpress.com

    Friday, April 8, 2016 4:10 PM
  • Thanks for all your help.  I now have a working map in v8.
    Sunday, April 10, 2016 8:33 PM
  • Awesome, great to hear.

    http://rbrundritt.wordpress.com

    Monday, April 11, 2016 4:09 AM
  • If this is a public facing app I'd love to check it out when it's live. Always good to see what types of apps developers are creating with Bing Maps.

    http://rbrundritt.wordpress.com

    Monday, April 11, 2016 7:52 PM
  • Update: getX/getY is now supported by the mouseEventArgs object.

    [Blog] [twitter] [LinkedIn]

    Wednesday, April 27, 2016 11:55 PM