There is a property Map.TransformCenter that is not very good documented. I have set different values (from 0 to 1), but didn't saw any difference. What does this property do?
Printable View
There is a property Map.TransformCenter that is not very good documented. I have set different values (from 0 to 1), but didn't saw any difference. What does this property do?
[url]http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.maps.controls.map%28v=vs.105%29.aspx[/url] says: "TransformCenter Gets or sets a value to which the center of the map control is transformed."
so try it with a point instead of integer
are you kidding me???? of corse I have set the point with different values (0 - 1). But nothing have changed. What does it do?
Next time, when you refer a docs, you could give a link where you found it. Also as I can not read your mind, you might want to show code on things you have done, so I would not need to guess. Currently not having my WP8 environment with this machine so can not test how the API would work.
Anyway, as the value set there is point, i.e. it has X & Y values, I would not thing that value max to 1 would have any difference really. The docs are bad, but I would assume that the change could be actually in visible pixels, so would suggest trying out higher value.
The 0-1 thing probably comes from earlier experience with viewports of various graphical libraries. So it is not a mark of insanity or something like that.
However I have not found reference to viewports in this context, and especially the paragraph[QUOTE=Remarks]After you set the value of the TransformCenter property for the Map control, the Center property continues to return the previous center until you set the Center to the same value as the TransformCenter.[/QUOTE]suggest that TransformCenter is something geographical too (on the other hand, [url]http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.maps.controls.map.center(v=vs.105).aspx[/url] works with GeoCoordinate, so speaking about 'same' remains to be confusing to me)
Was thinking the same (that it would be geo coordinate), but was thinking to trust the actual definition , in which the value is point (i.e. its int,int point, where geocoordinate would be double,double +additional information one..)
I'm sorry for over reacting, but after your first post about polyline I was "confused" :)
The value must be between 0 and 1 else you get an exception. I would assume that it is a pivot center of heading rotation in %. This is what I'm looking for. But it does not work.
There is no answer on Microsoft forums either :(
[QUOTE=nesher_hh;906612]There is no answer on Microsoft forums either :([/QUOTE]
I dont have a way to test this now, but reading this:
"After you set the value of the TransformCenter property for the Map control, the Center property continues to return the previous center until you set the Center to the same value as the TransformCenter.
Don’t use the Latitude property and the Longitude property to set the center of the Map control. Instead, create a new GeoCoordinate object and assign it to the Center property."
So what I read here is that if you set TransformCenter to something different, it will probably change the map visually (or something else, your guess is as good as mine because I cant test right now) but the Center property will remain the same, until you set it to the same coordinates as TransformCenter. What's confusing here is that Center assume a GeoCoordinate and TransformCenter a Point. So I'm assuming that you should use a GeoCoordinate and convert it to a Point with MapPointConverter.
[url]http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.maps.controls.mappointconverter%28v=vs.105%29.aspx[/url]
See if that helps.
TransformCenter is a pivot point about which the map will rotate. It is measured in %. Where 0.5, 0.5 is a center of a map control.
If you bind any property of Map to a view model you have to use TwoWay mode. Seems like a bug, normally you don't have to do this, but the Map control won't work if you don't do this.
[QUOTE=nesher_hh;906776]TransformCenter is a pivot point about which the map will rotate. It is measured in %. Where 0.5, 0.5 is a center of a map control.
If you bind any property of Map to a view model you have to use TwoWay mode. Seems like a bug, normally you don't have to do this, but the Map control won't work if you don't do this.[/QUOTE]
Ok now I get it. Thanks for sharing.