Change direction of map according to compass?

Topics: Feature Requests
Aug 10, 2010 at 6:00 AM
Perhaps someone has some ideas about this. While taking my application out for a testdrive (literally) yesterday I noticed that while I was driving forward my marker was moving backwards. This was due of course to that the map take to consideration to which direction im traveling on. I have the compass direction from the GPS so if I could rotate the map or likewise then perhaps the map could adjust to my direction. Any thoughts?
Coordinator
Aug 10, 2010 at 6:07 AM

yes, rotation would be nice feature

Aug 10, 2010 at 7:41 AM
Wonder how though. Just rotating the map will also rotate stuff like streetnames etc.
Coordinator
Aug 10, 2010 at 8:33 AM

yes, and maker/routes need to be reallocated too

Aug 13, 2010 at 7:01 PM
I already try to "think" about it, right now the title from google or openstreetmap contain road name into the "picture", so I think the best way to archive that will be generate the title without the road name, and add the name into another layer with the position, so we'll be able to "rotate" them. but it seem to be alot of job, from Gmap.net and from a title server. Maybe I'll try to do it with openstreetmap some day :) if you found anything let me know :)
Aug 14, 2010 at 2:34 AM

Is it an option to use WPF and get it to control the rotation for you? Of couse this does not fix the issue of words being not so easy to read.

Aug 14, 2010 at 2:36 AM
I already saw something for "rotate" the map into gmaps.net but the name of the road will be in reverse sometime.. so it's not really really "readable"
Aug 14, 2010 at 11:31 AM
Feels like the only way is to actually render the map on the fly from OSM data. One more thing to consider is the caching. If the map always fetches "head-up" tiles from the server there will be 360 times more tiles to cache than now?
Coordinator
Aug 14, 2010 at 12:28 PM

you can cache vector data too

Sep 2, 2010 at 10:16 AM

radioman, I know you are very busy :) but do you know someone can do the code for the map rotating (only the rotation), i'm searching someone who I can "pay" for doing the job and release it for everyone in your project. Do you know someone who you trust with free time? :) I'm pretty sure many other person will like this feature into gmap.net :)

Coordinator
Sep 2, 2010 at 11:50 AM
Edited Sep 3, 2010 at 11:12 PM

there are many coders with a lot of free time and with zero motivation ;} ..anyway it's on my list, but if someone makes it faster, that's wonderful ;}

current status ;} ...basicaly rotation is working, the tough part is to un-rotate markers/tooltips/routes/polygons back to normal

Sep 2, 2010 at 6:06 PM

oh nice, it is already into the current code?

Coordinator
Sep 2, 2010 at 6:14 PM

on my hdd ;}

Sep 2, 2010 at 11:15 PM

oh, too bad, I'll wait you release it

Coordinator
Sep 2, 2010 at 11:24 PM

waiting doesn't help much ;}

Sep 2, 2010 at 11:27 PM

I know, but it seem you already have ot almost done, so it will be a little stupid to start it again :) at least I'll wait you release it on the current code "as-is" and I'll try ti modify it :)

Sep 3, 2010 at 6:09 AM

Sweet, can't wait to get my hands on it!

But I guess you have not found a way to also rotate streetnames etc?

Coordinator
Sep 3, 2010 at 10:35 AM

nop, but you can wait for that too ;}

Sep 3, 2010 at 6:03 PM

I have some idea to work with for the roadname, but since i'm not an expert for the "rotation" and wpf, I'll wait for that part, but as soon you release it I'll work on the road

Coordinator
Sep 3, 2010 at 11:08 PM
Edited Sep 3, 2010 at 11:11 PM

great feature is comming! ..Engage ;} 

Sep 6, 2010 at 3:47 AM

really nice!! I can't wait longer to see it in the source :)

Coordinator
Sep 6, 2010 at 1:28 PM

check the sound! ;} markers/routes/polygons and mouse events now are in sync even using rotation!

Sep 6, 2010 at 7:45 PM

great, for wpf or winforms? or both? :)

Coordinator
Sep 6, 2010 at 7:53 PM
Edited Sep 6, 2010 at 7:55 PM

both in time ;}

..i wonder how to make it work on mobile, there is no built-in rotations ;/

Coordinator
Sep 7, 2010 at 7:48 AM
Edited Sep 8, 2010 at 9:48 AM

MainMap.CurrentPosition = marker.Position;
if(marker.Bearing.HasValue)
{
 MainMap.Bearing = marker.Bearing.Value;
}

p.s. now rotated corners are filled too, basically it's ready to use, you can test it in action, by using transport demo and clicking on some bus, maps set bearing like object and tracks it

Sep 8, 2010 at 1:46 PM

oh nice :) I'll test it :)

 

it's work only with winform right?

Coordinator
Sep 8, 2010 at 3:54 PM

indeed ;}

Coordinator
Sep 9, 2010 at 7:35 PM

wpf version is coming too! Hold on ;]

Sep 10, 2010 at 7:14 AM

great news!

Sep 17, 2010 at 1:32 AM

Any news? I cannot sleep, I always dream of it :)

 

Coordinator
Sep 17, 2010 at 4:37 AM

test it, the center of rotation isn't in the center, any ideas?

Sep 17, 2010 at 1:13 PM

sure, where can I download it?

Coordinator
Sep 17, 2010 at 3:35 PM

http://greatmaps.codeplex.com/SourceControl/list/changesets

Sep 17, 2010 at 8:33 PM

oh, the code are already in the source "server" ?

Coordinator
Sep 17, 2010 at 9:11 PM

still dreaming ;}

Sep 18, 2010 at 3:15 AM

i'm not sure to understand,  the center of the rotation problem in on the wpf version or winform?

Coordinator
Sep 18, 2010 at 12:00 PM

wake up neo ;}

Sep 23, 2010 at 12:01 AM

any new discovery for make it work?

Coordinator
Sep 23, 2010 at 4:42 AM

it works, we need a fix, any ideas? ;}

Oct 26, 2010 at 9:17 PM

oh, cool it seem to work now :)

 

any way for make it "rotate" up to down for a little projection? :)

Coordinator
Oct 27, 2010 at 2:28 PM

up/down?

Oct 27, 2010 at 7:05 PM

making a little incline, like what some GPS are doing, they call that 2.5D

Oct 27, 2010 at 7:13 PM

making a tilt angle of the map

Oct 28, 2010 at 7:10 AM

like:

example image

Coordinator
Oct 28, 2010 at 7:18 AM

i see,  yes its posible

Coordinator
Oct 28, 2010 at 7:26 AM

try insert before DrawMapDesktop:

Matrix x = new Matrix();
x.Shear(2, 2);
e.Graphics.Transform = x;

 

Oct 28, 2010 at 7:29 AM

hmm, i'm using WPF, so I presume I need to put it before DrawMapWPF ?

Coordinator
Oct 28, 2010 at 7:32 AM

something like that ;}

Oct 28, 2010 at 7:46 AM
Edited Oct 28, 2010 at 7:47 AM

hmm something is wrong :) I don't know how to do it in WPF, it seem .shear doesn't exist. but even in windows form, it "reverse" the image make it appear not at the right place :)

 

oh and I didn't found the DrawMapDesktop, but found DrawMapGDIplus instead

Coordinator
Oct 28, 2010 at 7:52 AM

..anyhow, it doesn't work somehow magically, you need to calculate everything precisely exact

Oct 28, 2010 at 9:41 AM

hmm, got the command working for an "image"

RotateTransform3D myRotateTransform = new RotateTransform3D(new AxisAngleRotation3D(new Vector3D(1, 0, 0), 35));

 

but need to use WPF 3D, I don't think it will work with gmaps.net  :(