OnPremise:
OnLine:
In case you build solutions that uses BingMapKey in other way then OOB BingMap control and make solution works the same way both OnPremise and Online you can manually update this field through code:
QueryExpression query = new QueryExpression("organization") { ColumnSet = new ColumnSet(false) }; Entity organization = service.RetrieveMultiple(query).Entities.FirstOrDefault(); organization["bingmapsapikey"] = "Your Bing Maps API Key"; service.Update(organization);
string bingmapkey = null; QueryExpression organizationQuery = new QueryExpression("organization") { ColumnSet = new ColumnSet("bingmapsapikey") }; Entity organization = service.RetrieveMultiple(organizationQuery).Entities.FirstOrDefault(); if (organization != null && organization.Contains("bingmapsapikey")) { bingmapkey = organization.GetAttributeValue<string>("bingmapsapikey"); } //Usage of bingmap api key
No comments:
Post a Comment