Excluding a certain country from a route - azure-maps

Is ability to exclude a specific countries or regions from route present? For example, I plan to go from Ukraine to France, but I don't want to go thru Poland. How can I set this in GetRouteDirections API?

I'm not of a way to specify a specific country code to avoid all together. It is possible to specify which countries to avoid tolls, and to specify custom areas to avoid using GeoJSON using the POST Route Directions API: https://learn.microsoft.com/en-us/rest/api/maps/route/postroutedirections#request-body
Another approach is to add another waypoint in-between Ukraine and France to force the route to go around Poland. The coordinate (49.001636, 22.890648), goes through a point just below the Polish border and would put the user on a road where they would cross into Slovakia instead.

Related

integrating road signs in Here maps

Hi I am new to React and Here maps, I am using Here maps for maps. Currently I am able to show live marker position, I want to show road signs as well.
For that I am constructing a request as specified here documentation
https://image.maps.ls.hereapi.com/mia/1.6/roadsign?apiKey=H6XyiCT0w1t9GgTjqhRXxDMrVj9h78ya3NuxlwM7XUs&region=USA&category=0&label=I-80&w=100&h=100&f=0
In the documentation , only highways signs are mentioned. Is it possible to query traffic,speed limit signs as well? And the response returns image(PNG) , I am thinking to put that image onto map at specific lat and long position. Is this the right way to do?
The roadsign feature of the Map Image API has a very limited selection of signs and is in maintenance. You will have to create or source these images yourself. Fortunately there are many free icon collections available on the web.
Once you have the images, you can use a MapMarker to place these on the map.

Tableau: Marking Cities and Towns on a Map

I have made a map with Tableau that shades based on the number of customers we have by county. I am trying to add labels of towns/cities in the area.
I tried going to map options --> Place names but there are two problems with this. First the places appear under the shading, secondly many places (some of the towns aren't big enough to be included on a standard list) are not included on the map.
I tried overlaying a custom list of city locations on top of the counties; but it seems to only load one or the other.
You have several options:
Go to Map Layers > Washout - modify it to see whether it improves the effect
Go to Marks > Color > Transparency and modify it.
Load a custom list with city names and their location.
Use the county variable as Label.
One of these should work.
Also, Tableau's place names are not complete so there will be gaps for smaller cities/towns. However, they will appear when you zoom in.
Tableau 10 should have improved mapping options so maybe that will solve your problem.

How can I get merged data from website and mobile website for Google Analytics?

I have a website - and the website redirects the users automatically to its mobile site when the users access using mobile devices.
The problem is, Google Analytics treats those two pages as a separate page.
For exmaple,
http://story.pxd.co.kr/917 and
http://story.pxd.co.kr/m/post/917
are same page but GA shows statistics as two different pages.
How can I merge the data from the two pages?
(When I want to see mobile data only, GA already supports various ways for it)
Thank you in advance.
Jay
Untested as far as the regex goes and might need a little refinement, but the principle works like this:
Go to admin, views, filters. Create a new filter , custom, advanced.
In "Field A" select "Request Uri" from the dropdown.
In the text field at the right (extract) enter "./m(.)" (without quotes). This extracts everything to the right of /m via and stores it (via the brackets) in variable (if it does not work at the first go you have to look up regexp with Google and refine). The values of that variable now should be in your example "/post/917", it is accessible later via the placeholder $A1 ("A" because it's from field A, "1" because it is the first value extracted. If you use more than one bracket you might also have $A2, $A3 etc).
Leave Field B empty.
In "Output To" select "Request Uri". Enter your hostname http://story.pxd.co.kr/ . Append the placeholder $A1 - this contains the page path without the "m".
All steps combined will change "http://story.pxd.co.kr/m/post/917" to "http://story.pxd.co.kr/post/917" and thus unify the urls so they will be displayed as the same page in the reports (you might want to include some custom dimension to discern if this was a mobile view or a desktop view, or you can use the "device category" as second dimension to see which was which).
Btw. data that has already been recorded will not be changed, filters do not work on historical data. And be sure to keep a view without filters (filters are destructive and if you make a mistake you won't be able to recover the data).
Thank you Eike,
With your hint, I found better way.
I used 'Advanced Filter' with 'Search and Replace'
So let the GA search /m/post/ and replace with /
Thank you!

Is there a clean way of users managing their own locations?

A lot of my site is dynamically generated dependant on the user location.
To get an initial fix I am currently using the Smart_IP module which does this based on the user IP address - which works great as a starting point. I can access $_SESSION['smart_ip']['location']['longitude'] & $_SESSION['smart_ip']['location']['latitude'] as required - perfect!
But I need to allow my user to override this..
Using HTML5 geolocation. I want to only do this on user request, ie click 'locate me', rather than requesting their location uninvited.
Using one of a few pre-defined locations selectable by the user.
Using an inputed address by the user.
Is there any drupal module I can use for this, or how else could I achieve it?
-
Just to clarify, I am talking about anonymous users here - the general public visiting my site. I just want them to be able to refine their 'location' by overriding the defaults I give them using smart_ip.
I suggest to use Geolocation field and all it's submodules or Geofield. Last one provides more input methods.
Use the Address field module to allow the user create multiple addresses into a node (or even into his profile), Geocoder module to get the lon/lat from these addresses and then a Views to display them in a list.
Same as 2 but without views.
If you want to allow user select one of the 3 methods you can use an other - helper - field (eg a select list with the 3 options).
Finally you should add an extra field to store the lat/lon pair final values maybe with Computed field module or 2 simple textfields that will get the selected values through javascript.

Show Opportunity related Contacts in Custom Object Field

I have the next issue.
I have a custom object called 'Application', and I have this requirement:
"Show all Contacts related to an Application. Create a field on Application object, must be read only".
I solve it with apex code. 'Application' has a lookup to Opportunity, Opportunity to Account, and all my contacts have AccountId, so this way, I get all the contacts using apex code in a trigger.
But, I've been ask to change this to a Formula field in Application object.
So, my issue is next. I'm not able to get all contacts with advance formula editor, because they're not part of any object. I have no master-detail relationship.
Does any one know how can I achieve this using configuration? I should not use apex code for this req.
Thank in advance guys.
I don't think you can do it.
In formulas / merge fields syntax there's no way to go "up, up then down" (Application -> Opportunity -> Account -> down to Contacts related list). There's also nothing that would let you loop through Contacts (and display what? Ids? Names? Emails?). Roughly speaking you can only go up through dots.
You might want to explore path of "cross object workflow" rules but I imagine that when I add a new Contact to Account it should somehow "spread itself" to all related Applications? There's no straight way to fire a workflow on delete too - so you'd eventually end up with inaccurate list.
I'd say trigger was a good solution. Maybe it ws unoptimized but if it has to be in a field - tough.
There might be a fairly simple way of achieving that by embedding a visualforce page within Application page layout.
This should be doable with pure Visualforce (so technically there will be no Apex code ;))
Something as simple as
<apex:relatedList list="Contacts" subject="Application__c.Opportunity__r.AccountId" />
would be a good start (if you want your own layout and not a rel. list - you should be still able to pull it off with <apex:repeat> or <apex:pageBlockTable>.
There's one BUT here: it's not a field, just a display trick. Forget about using it in reports, mobile applications etc.
Another way - would it be acceptable to be 1 click away from these contacts? You could make a report "Account with Contacts", filter it by Id of one Account and later use "URL hacking" to change the filter depending on from which Application you'll click it. This link could be either a formula field or a real custom button/link. Technically - it's pure config, no apex & VF.
You can read more about URL hacking at Ray Dehler's excellent post and specifically about dynamic Reports here or here.

Resources