map.setHeading

2,468 views
Skip to first unread message

gullet

unread,
Jun 17, 2011, 5:54:08 AM6/17/11
to google-map...@googlegroups.com
Hi,

I'm wondering about the setHeading()-method and why I can't make it work. I recall having seen somwhere that setHeading is only available for maps where there is tilt-support, but I can't find that information either and if that is the case, I'm wondering why. According to the API Reference, it should support just a number as parameter, but it doesn't say anything about maps with tilt.

My task is to have my map shown in the same direction as the position from the geolocation supported browser gives me. Can I achieve that in any other way?

Thanks in advance.

gullet

unread,
Jun 20, 2011, 7:27:28 AM6/20/11
to google-map...@googlegroups.com
I'm a bit disappointed having no answers on this. Is there no Google employee who can give a clarification on how to use the setHeading()-method and under what circumstances it is available.

Thanks in advance.

Chris Broadfoot

unread,
Jun 20, 2011, 8:26:40 AM6/20/11
to google-map...@googlegroups.com
Perhaps because you didn't link to your map:

The reference documentation for setHeading says:
Sets the compass heading for aerial imagery measured in degrees from cardinal direction North.

Aerial imagery appears only when the map has tilt set to 45.

See the documentation for details:

--


On Mon, Jun 20, 2011 at 9:27 PM, gullet <bjorn.g...@gmail.com> wrote:
I'm a bit disappointed having no answers on this. Is there no Google employee who can give a clarification on how to use the setHeading()-method and under what circumstances it is available.

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/JZp4SVw6M_wJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Rossko

unread,
Jun 20, 2011, 9:18:06 AM6/20/11
to Google Maps JavaScript API v3
> I'm a bit disappointed having no answers on this.

Ask for your money back?

> Is there no Google
> employee who can give a clarification on how to use the setHeading()-method

Mostly the group is used by fellow developers, Google employees do
look in from tme to time.

> and under what circumstances it is available.

I know the documentation can be variable depending on language, but
the English version seems reasonably clear :
"Sets the compass heading for aerial imagery measured in degrees from
cardinal direction North."

So I guess the next question is, what is aerial imagery?
The documentation seems to provide the answer, along with an example
of using setHeading
http://code.google.com/apis/maps/documentation/javascript/maptypes.html#45DegreeImagery

gullet

unread,
Jun 28, 2011, 2:37:54 AM6/28/11
to google-map...@googlegroups.com
Okay, fair enough. But let me rephrase the topic then:

I'm looking for the similar map functionality as in Places (for Android). When I tap my position it downloads the map with heading as cardinal north by default, but I can rotate the map and if I can rotate, I'm pretty sure that the heading is known to the map and settable (although I haven't looked into it).

Am I plumbing in the wrong API?

Thanks in advance.

Rossko

unread,
Jun 28, 2011, 4:35:32 AM6/28/11
to Google Maps JavaScript API v3
> Am I plumbing in the wrong API?

Possibly. Regular Maps API doesn't do rotation. Maybe look at Google
Earth API. Regular Maps API doesn't do user location, though of
course you can interface to a number of user-location tools. If
you're trying to determine the direction the user is facing, those are
the tools to look at.
Reply all
Reply to author
Forward
0 new messages