Google Maps API: Directions don't minding if street is one way or not - api

I want to draw direction from point A to B to C to D to .....
and I want to see only the map with directions (without text directions next to it)
Problem is if I use G_TRAVEL_MODE_DRIVING it displays me directions minding if the street is one way or not.
If I use G_TRAVEL_MODE_WALKING it shows me the directions the way I want but this mode requires derectionsPanel in constructor (this is a div element to show directions in textual format)
new GDirections(map, directionsPanel);
So I'm stuck in here. Suggestions?

Can you make the directionsPanel div invisible?

Related

Graylog geoip no showing all locations on the map

I have a problem, that in the graylog Map view it doesn't show all the locations. Shows very few country codes, knowing that there exist a lot of countries, in the map view I can't get any of them.
Here you can find a screenshot.
Country code field is not enought to show point in map. You need coordinates field, with GPS coordinates (latitude,longitude format) to show point in map.
Check this articles:
https://www.graylog.org/post/how-to-set-up-graylog-geoip-configuration
https://www.graylog.org/post/implementing-geolocation-with-graylog-pipelines

Change product image on variant change

I am struggling to find an ideal solution to change the product image based on the variant selection. I do not see any identifier on the product images using which I could do a cross matching for js change event.
Every theme has this feature, so I guess, there is a pretty good solution to this.
Can you please help me showing the right path?
Thank you.
It depends on the design of the page and what are using.
For example if you plan to show a single image for the variant change you can use the variant image directly.
But if you plan to use a gallery of images there are different approaches. The one I use in most cases is to set an ALT attribute to each image with the name of the color that it's pointing to. Based on those ALT attributes I use some JS logic to filter specific images and show the correct ones.
Other approaches will be to use metafields, tags, linklists etc... A lot of different ways, but each is tied to some JS logic and some bad user experience for the administration since he will be required to switch between different pages and to create different elements in order to tie them to the images.
The final way is to use a separate APP for this.

Modifying photosphere on website thing

What i am trying to do is to use a photosphere on my website so that it shows up on full screen as a website cover page. The problem is the the code to embed a photosphere in a webpage given here by google
https://developers.google.com/photo-sphere/web/
lets only the photosphere size to be hardcoded as
displaysize="600,400"
what ever the values but its still hardcoded. What i want is that it gets adjusted to the screen of the user and gets displayed in the whole browser window. Any one got an idea how to pull it off? I didn't find any stuff about 'photosphere on web' other than the google link i gave above.
Indeed the API is currently designed to take static values. I think it's a good point that users might want to set the dimensions to 100% and let it resize dynamically.
I put it on the TODO list and will try to get to it shortly.
In the meantime, one work around is the following: After the viewer loads you will find an iframe on the page which contains it. You can change it's dimensions dynamically to your liking and the viewer should adapt.
The API provided by Google wraps the whole photosphere in layers of iFrames.
You can use the API to request a certain photosphere but only use the response to parse it for the values you need. Then you create your own request and the result can be shown fullscreen.
An example link is this
I created this link dynamically from the JSON response from the elements
media$group media$content 0 url
Hope it helps.
Can't you take the raw image and just use webgl to project it on the inside of a sphere?

determine google maps marker display status

Straight from the google reference material on their API
Hiding a set of map markers previously plotted to hide
mapArray[i].setMap(null);
Simple.
However is there anything that will allow me to asses the display status of a marker thus allowing me to simply toggle the display status?
I've been googling it and searching their api refs but cannot see anything.
Try google.maps.Marker.getMap().

How can I display a google search api result in a div?

I'm trying to display the google search result in a specific div. It seems like there is a way to print the results in a different frame or window by tweaking 'target' property... but not in a different div. Has anyone actually done it before... or know any tutorials available on the internet?
JSON/Atom Custom Search API
Is this what u want?