Skip to main content

Key not present in the dictionary

Comments

5 comments

  • Permanently deleted user
    Hi Michael,

     

    That article is specific to Silverlight.  Because the APIs return different fields, the same workflow is not compatible with the HTML5 viewer.  In the alert that pops up with !! as the title you will see the field NewExtent is not included and the workflow depends on it.

     

    Regards,

     

    Wayne

     

     
    0
  • Permanently deleted user

    Wayne,

     

    Thanks for that.  Yes, I understand that this workflow was written for the Silverlight viewer.  I want to adapt it for the HTML5 viewer.  I have made the determination that the only place where this workflow "breaks" is with the "NewExtent" method (property?) for the eventArgs variable.

     

    So...I am just wondering what methods/properties are returned by the MapExtentChangedEvent.  Wouldn't a "NewExtent" method/property be returned when a MapExtentChangedEvent fires in the HTML5 viewer?  (Maybe it has another name, but I assume that there is something analgous in the HTML5 event).

     

    Any help is appreciated!

     

    Michael
    0
  • Justin Kraemer
    Michael, did you have any success in this? I'm faced with the same problem.
    0
  • Permanently deleted user
    No, I did not get any satisfactory help on this (as you can see from above) and I didn't pursue it any further because we implemented a Silverlight viewer--so the HTML side of things was not needed.  I am still curious about this and really think I was onto something.  It just seems to me that the support tech didn't dig deep enough, but maybe I am wrong on that.  We don't have a very substantial support contract with Latitude, so I decided not to pursue it any further.

     

    But, if you find anything, can you make sure to post it back to this chain of comments?

     

    Thanks!

     

    Michael
    0
  • Permanently deleted user
    Maybe it's a bit late, but if you're still interested, how I got it working is, first I use eventArgs.Json to understand the structure of JSON denotes. Once I know what  denotes keywords are, then I could use .GetValue to get what I need. For example, for the MapMouseDownEvent, the .JSON will return {"0":{"isTrusted":true,"screenPoint":{"type":"point","x":394,"y":281.625},"mapPoint":{"type":"point","x":17043548.60147515,"y":-3169731.243495448,"spatialReference":{"wkid":102100}},"numPoints":0}} So to get the x coordinator of the map, I use eventArgs.GetValue("0.mapPoint.x"). Note the denote keywords are case sensitive!
    0

Please sign in to leave a comment.