If you wish to add a Location for a user to the MyAlerts database you will need to call the AddLocation method.
...
The AddLocation method needs the following parameters:
ClientId
This is the id for the client that was returned by the CreateSessionKey method.
SessionKey
This is the SessionKey for the client that was returned by the CreateSessionKey method.
UserIdThis is always set to 1
This is the unique user id for the user as stored in the MyAlerts database.
TypeId
This is always set to 1.
Geography
This is the X,Y coordinates for the location - These can be derived from the AstunLocationLookup table and take the form "POINT(502582.58412372, 159186.49997736)"
UniqueId
This corresponds with the UniqueId on the AstunLocationLookup table.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<AddLocationResult> <Error> <Code>string</Code> <Description>string</Description> </Error> <Success>boolean</Success> <LocationId>string</LocationId> </AddLocationResult> |
Error- Code / Description
An error code and description if the call to the web service is unsuccessful and the Success if False.
1001 – Invalid Session key provided
Success
This will be either True or False. If False an error message will be provided in the Error result, if True the LocationId will be provided.
LocationId
This is the Location ID that has been generated in the MyAlerts database and will only be returned if the Success is True. This is useful for subsequent calls such as SetLocationValues and SetUserLayerGroup
Code Examples
...