1-What is the best and correct way to pass a Google Map Polygon to Azure Search.
2-If 2 Polygons are intersecting, how does this need to be handled.
Thank you.
The only part of the Azure Search API where you can specify a polygon is in a filter expression. In the .NET SDK you can use the SearchParameters.Filter property to set the filter. The OData syntax reference for Azure Search has details and examples of how to format a polygon literal in the geo.intersects() function.
Azure Search only supports passing a single polygon literal to geo.intersects, so the second part of the question does not apply.
Related
App: Microsoft Dynamics 365 for Finance and Operations
Product version: 10.0.18
Platform version: Update42
Requirement to update address of the record as per pointer in Google or Bing maps.
The MAP button in Addresses grid of "All customers" reads the address and open corresponding Bing map in new tab.
Q1: is there a way to show map in the form itself, maybe using X++ code?
Q2: The pointer or address in not movable, so how to do that and read and update the existing address?
Kindly help with understanding the same.
A1:
Below is the post in Microsoft Forum that answers first question with the usage of HTML and JS resources in X++ form with observe method usage in order to get dynamics values
https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/437773/google-maps-in-microsoft-dynamics-365-finance-and-operation-s-form/1203259
I'm trying to build functionality into my app for 'admins' to assign users from their AD group to certain groups that are further assigned to app-specific roles. Basically a simple management component.
Adding the user with the oid to a group is easy, the problem I'm facing is finding the actual user.
Currently, the only option I'm seeing is making multiple api requests to v1.0/users (999 items max) and grouping them all in memory and then provide a simple search function to narrow it down.
I have also used the v1.0/me/people endpoint to search for users but this does not reveal all users from the AD group, just relevant users they deal with, so not too useful.
Is there any other api endpoint I could tap into to do a search ONLY on members of the same active directory?
Using the startsWith filter on multiple properties is probably the closest we can get to user search in MS Graph at the moment:
https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'sarah') or startswith(givenName,'sarah') or startswith(surname,'sarah') or startswith(mail,'sarah') or startswith(userPrincipalName,'sarah')
Ended up switching to the old AD Graph API and implementing a query on the endpoint as follows:
https://graph.windows.net/{ tenant ID }/users?api-version=1.6&$select=mail,displayName,objectId,givenName,surname&$filter=startswith(givenName,'SEARCH TERM') or startswith(surname,'SEARCH TERM')
If a function receives 1 single param, it will search for that parameter in both givenName and surname but you could configure this to search accross any other supported fields.
You could also completely ditch the $select= completely to get the whole data. I didn't want the clutter though and those keys are enough for me.
Instead of going with startswith You may get better experience using search keyword:
https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http#example-6-use-search-to-get-users-with-display-names-that-contain-the-letters-wa-including-a-count-of-returned-objects
Is there any preferred (fastest) way to select a SINGLE document from Azure Search Or does one have to issue a query using its ID etc.
Many thanks
If you're using the REST API: https://learn.microsoft.com/rest/api/searchservice/lookup-document
If you're using the.NET SDK: searchIndexClient.Documents.Get("Put your document ID here")
I am trying to add a filter in my Microsoft Graph API request on O365 data (like mails, messages, events, etc.) to only get items where certain regex triggers.
I found the search feature: Full Text Search Capabilities in Azure AD Graph API (preview), but it seems this feature have been removed (and it did not have regex capabilities).
Advanced warning notice: The Azure AD Graph team will be shutting off this preview capability. As of September 19th 2016, this feature will no longer be available. We’d like to hear from you if you have been using this capability, and what you think about it. We are currently investigating some options around introducing this type of capability again at a future (unspecified) date.
I also found the contains filter, that is used like this: $filter=contains(body, 'Bob'), but I can't seem to use a regex rule in it and it doesn't seem to be able to search in the body.
Is it possible to build a query that will only return items where a regex rule is triggered? Worse case scenario, I will download all items and then use regex rules on them, but I would prefer to not download all those useless items if possible.
The Azure AD Graph API and Microsoft Graph API are two different APIs. At present, the Microsoft API supports the OData Query Parameters to help customize the response.
Is it possible to build a query that will only return items where a regex rule is triggered?
No, it doesn't this feature. You may submit the feedback here if you require this feature.
I'm working on project that deals with advertisements and google maps. I save every advertisement latitude and longitude in my database, but I want to add an option that show user on the map and show all available advertisement around it with radius of 1 km, but I don't know how, Can anyone help me?
Seems to be an interesting project. These are the steps I suggest you :
Store you latitude/longitude as a geography data type using SQL Server. See geography (Transact-SQL).
From your webpage, retrieve the user location. See Use Geolocation API with Angular.js.
Send back the position to your web api (create a new action into your controller).
Write a stored procedure that take the user position as parameter and return the advertisement around it with radius of 1 km. See SQL Geometry find all points in a radius (Geography and Geometry have quiet the same functionalities).
Send the Advertisement location to the client side and use Google Map to show it (I am sure you're going to find some good tuto about that).
Good luck !