Autodesk 15606-011408-9300 Developer Guide - Page 43

Accessing Secure Data, Handling Busy State and Map Refresh, About the Busy State

Page 43 highlights

Accessing Secure Data Map authors can control whether developers can use the getVertices and getLayerSetup methods to access coordinate values and/or map layer setup data. Map authors control the security of this data from the Map Layer Properties dialog box in Autodesk MapGuide Author. If map authors allow access to the API, they can also stipulate that the application must send in a specific passkey first. If you are building an application for a map that requires a passkey to access the coordinate values and/or the layer setup data, you will need to get the passkey from the map author and pass it in with the unLock method to enable the getVertices and getLayerSetup methods. Remember that users can view any embedded scripts in HTML, so in some cases you may not want to hard code your passkey in your Web page. To keep the passkey secure, we recommend that you implement one of the following techniques: I Create an application that includes one frame that displays the map only. Be sure that the map fills up the entire frame. In this case, users will not be able to view the source code of the frame that displays the map. You can then hard code the passkey in the source code of that frame. I Write a Java applet that makes a request for the passkey to your Autodesk MapGuide Server and then returns the passkey to the script in the Web page. Call this applet in your embedded script after making sure that the user has met your security criteria. I Write your entire Autodesk MapGuide Viewer application in a Java applet. Handling Busy State and Map Refresh This section describes the map busy state and the techniques for coordinating when and how to refresh a displayed map. When Autodesk MapGuide Viewer refreshes the map display, it can cause errors in your application unless you take the correct steps to prevent them. You need to familiarize yourself with the way that the Autodesk MapGuide Viewer API is designed so you can understand how to code your application correctly. About the Busy State Autodesk MapGuide Viewer enters a busy state whenever it refreshes the display, and the busy state does not end until the data has been received from the server and the display is updated or refreshed. Accessing Secure Data | 43

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208

Accessing Secure Data
|
43
Accessing Secure Data
Map authors can control whether developers can use the
getVertices
and
getLayerSetup
methods to access coordinate values and/or map layer
setup data. Map authors control the security of this data from the Map Layer
Properties dialog box in Autodesk MapGuide Author. If map authors allow
access to the API, they can also stipulate that the application must send in a
specific passkey first. If you are building an application for a map that
requires a passkey to access the coordinate values and/or the layer setup data,
you will need to get the passkey from the map author and pass it in with the
unLock
method to enable the
getVertices
and
getLayerSetup
methods.
Remember that users can view any embedded scripts in HTML, so in some
cases you may not want to hard code your passkey in your Web page. To keep
the passkey secure, we recommend that you implement one of the following
techniques:
Create an application that includes one frame that displays the map only.
Be sure that the map fills up the entire frame. In this case, users will not
be able to view the source code of the frame that displays the map. You
can then hard code the passkey in the source code of that frame.
Write a Java applet that makes a request for the passkey to your Autodesk
MapGuide Server and then returns the passkey to the script in the Web
page. Call this applet in your embedded script after making sure that the
user has met your security criteria.
Write your entire Autodesk MapGuide Viewer application in a Java applet.
Handling Busy State and Map Refresh
This section describes the map busy state and the techniques for coordi-
nating when and how to refresh a displayed map. When Autodesk MapGuide
Viewer refreshes the map display, it can cause errors in your application
unless you take the correct steps to prevent them. You need to familiarize
yourself with the way that the Autodesk MapGuide Viewer API is designed so
you can understand how to code your application correctly.
About the Busy State
Autodesk MapGuide Viewer enters a busy state whenever it refreshes the
display, and the busy state does not end until the data has been received from
the server and the display is updated or refreshed.