I recall reading an article somewhere about wrapping the map around like Google map does. Can we do this in MapSuite?
TIA.
I recall reading an article somewhere about wrapping the map around like Google map does. Can we do this in MapSuite?
TIA.
Hi Klaus,
I’m not quite understand it. Could you show me the article to help me understand better? That must be much appreciate.
Thanks,
Howard
Howard, I think the term here is continuous panning, when when you keep panning towards either end, east or west, the map eventually wraps around.
Will see if i can locate the article but I did read this somewhere on your site. Probably in one of the white papers.
Hi Klaus,
I know what you mean right now. But Wpf Desktop doesn’t support this feature. But it’s a good feature which I have added to our issue list. We will consider it when our higher priority work is finished.
Sorry for the inconvenience now.
Thanks,
Howard
Hi Howard,
I’m about to start a GIS application where this feature is a must, as some of the assets cross pacific ocean region. I found a workarround by creating a custom projection that places a copy of the worldmap at -180 and an additional copy at the right at 180 and then moving the extent -360º (or +360) when the user pans to one side, so it seems the worldmap wraps when there are three consecutive worldmaps. But this will need the triple of resources than if map wrap was supported. In addition I will need to plot the markers and tracks three times as well.
Before starting such a mess, I’m wondering if you already have an estimation on when will you include this on WPF Desktop Edition.
I also read that there will be a mayor release on November. Is there any rough list of the improvements/features it will include?
Regards,
Carlos.
A rough list of the features coming in November will be nice. This mapping problem is actually my next being challenge to solve. I am still strugling with splitting lines and polygons across the international dateline but hopefully, I can converge to a robust solution soon.
Carlos, just a thought as I need to solve this problem too. Rather than having three maps in memory, at the same time, could this dynamically be done based on current map extent? In other words, can you reproject when map center is no longer around zero?
I wouldn't know how to do it, as for plotting tracks on POR I need to project the map at least twice. I already overrided the scalebar and the graticule classes to work in "extended longitudes", and the perception of wrapping map from the user experience while panning is ok. Tracks are a chalenge, but my idea was to plot everything as I would do in the standard map, but in the -360 and +360 projections too, so if for instance the track goes from 160W to 160E then paint a track from 160W to 200W, and do the same in the West and East maps, so the same track would be plotted at -160-360=520W to 560W and 160+360=200E to 160E.
Even though this would solve my problem, is a pity such a waste of resources, and of course the added complexity in the development. And I want to be sure ThinkGeo is not going to implement this just when I have the messy implementation working, so I'll need to rework everything again.
I am not part of the Map Suite developement team and I don't have the full insight on what the solution exactely is going to be, but as a GIS technician at ThinkGeo I can express my opinion on the subject of "wrapping the map around" as you pan East or West beyond the 180 meridian. It is very difficult to have a fully functioning map with dynamically plotted data without getting into some real complexity. Actually, Google Map does not even do it. It just gives you the illusion that you can pan east or west forever thanks to some technique using some pre created tiles. If you plot something yourself , it is always going to appear on the central map, not on the peripheries. You can test it by yourself.
I think that the best illustration for the whole problem can be found in the Code Community Great Circle on Pacific code.thinkgeo.com/projects/greatcirclepacific. It clearly shows the limits of Google Map when you see the Great Circle bouncing on the 180 meridian. With Map Suite, we implemented a way to actually have a more realistic result but with some complexities as you will realize by looking at the code. I just wanted to make you guys aware of the difficulties involved in implementing a simple and elegant solution for this issue.
Dear Val,
I’m fully aware of the complexities, if it was easy I would not ask if you plan to implement it ;)
What I try to avoid is a huge effort in developing a “wrapping earth” illusion in my solution if you plan to do it and in a short time the engine can provide this functionality fo us.
Now that 4.5 release is out, maybe you have a better idea on the roadmap for the following months…
Regards,
Carlos.
Carlos,
I think that for now, the only viable technique for wrapping the earth around is to apply the offset projection to your features as you see in the Code Community project Great Circle on Pacific. I don't think that we have on the road map the implementation of the "Earth Wrapping Illusion" for our control for the next public release in May 2011.
Val.
Hi Val,
Thanks for the clarification. Offset projection works, but my concern is that I will have a 1/3th of normal performance as I will need to create the charts and markers three times (central, west and east), consuming thee times the resources I would need if wrapping map ilusion is implemented.
It was nice if you had it in the roadmap.
Carlos.
I would not be overly concerned about the drawing performance being affected because of having to basically draw three times the same thing on the map. You will not see the performance decreasing in that proportion. The actual drawing is only one part of the whole rendering process of the features.
I will ask to some leaders of the developement teams if they have any plan to start working on the Map Wrapping Illusion and I will get back to you.
Thank you.
I talked to the development team and thay told me that this is not high in their priorities due to the complexity of the issue and low requests we have from our users. We have that issue in our issue tracker though and we plan to add it in the future but I cannot tell you when. Thank you.
Hi,
This feature is also a must for my application. In my mind, the end-users all want today to get a “google-map-like” application when dealing with GIS; i.e. to navigate the map the same way. So I’m quite surprised you are not planning to implement it soon…
Are you aware of an easy solution to bypass the problem ? For example, a way to override the OnRender method ?
Thanks
Olivier
I share same sentiment Olivier. Here we are starting to investigate how to get this done as this is one of our customer requirements. I was definitely surprised by Val’s response.
My application is global vessel tracking, so it’s a must as well. I’m still investigating how to do many of the things, but It’s really challenging. To create this wrapping illusion will be an important part of my overall development.
Please reconsider your priority list.
For instance, one of the functions that doen’t work if you try to create a wrapping ilusión is ExtentHelper.GetWorldDistanceBetweenTwoScreenPoints when the CurrentExtent is POLYGON((-215.394818549403 66.437367678274,34.9049697358354 66.437367678274,34.9049697358354 -90,-215.394818549403 -90,-215.394818549403 66.437367678274)) Or some other extent that goes beyond -180 or 180.
You get the ArgumentOutOfRangeException:
System.ArgumentOutOfRangeException was unhandled by user code
Message=“The decimal degree longitude value you provided was out of range. Parameter name: fromLongitude”
ParamName=“fromLongitude”
Source=“MapSuiteCore”
StackTrace:
at ThinkGeo.MapSuite.Core.x6d719af406ea4c2c.x000790e3d1efa7f1(Double x71c485ec47c597f6, String x34decc57f0820440)
at ThinkGeo.MapSuite.Core.DecimalDegreesHelper.GetDistanceFromDecimalDegrees(Double fromLongitude, Double fromLatitude, Double toLongitude, Double toLatitude, DistanceUnit returningUnit)
at ThinkGeo.MapSuite.Core.ExtentHelper.GetWorldDistanceBetweenTwoScreenPoints(RectangleShape worldExtent, ScreenPointF screenPoint1, ScreenPointF screenPoint2, Single screenWidth, Single screenHeight, GeographyUnit worldExtentUnit, DistanceUnit distanceUnit)
at HelloWorld.frmMap.WpfMap1_MapClick(Object sender, MapClickWpfMapEventArgs e) in C:\Documents and Settings\Developer\Escritorio\HelloWorld\HelloWorld\HelloWorld\frmMap.xaml.vb:line 307
at ThinkGeo.MapSuite.WpfDesktopEdition.WpfMap.OnMapClick(MapClickWpfMapEventArgs e)
at ThinkGeo.MapSuite.WpfDesktopEdition.WpfMap.x19435428c02c9d16(Object xe0292b9ed559da7d, MouseButtonEventArgs xfbf34718e704c6bc)
at ThinkGeo.MapSuite.WpfDesktopEdition.x82439f22e737363b.OnSingleClick(Object sender, MouseButtonEventArgs e)
at ThinkGeo.MapSuite.WpfDesktopEdition.x82439f22e737363b.x65214453abca916a(Object xe0292b9ed559da7d, MouseButtonEventArgs xce8d8c7e3c2c2426)
at ThinkGeo.MapSuite.WpfDesktopEdition.x82439f22e737363b.x895730b9775c5d4a(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
InnerException:
This turns to create the wrapping world illusion from hard to near impossible, as detection of user click on western or eastern worlds is then almost impossible unless you gives us support or at least you remove the +/-180º boundary restriction on all of your functions.
Hi Carlos,
You have gotten the issue that the polygon's boundary is overflown the boundary of the decimal degree. For wrapping the world, I have an idea for rendering the shape files; I think you can extend this method more in the future. Please download the attachment and see how it works.
Please feel free to let me know if you have more queries.
Thanks,
Howard
DisplayASimpleMap.xaml.cs.txt (3.77 KB)
Val,
One of our customer just brought it to our attention that you guys do support map wrapping. Unfortunately, he was referring to what you guys have done with the Map Suite Web Edition. See websamples.thinkgeo.com/ and click Samples--> New features --> Wrap date line
Could you guys please port over the code to the WPF Desktop edition. I see that wrap around in the web edition is supported by LayerOverlay, which is all we need.
Thanks again.
Hi Klaus,
How we implemented this feature in Web Edition by encapsulating the functionalities provided by OpenLayers, which we can’t port over to WPF Edition easily.
The wrapping map is a big feature which involves intense work to be done. We’ll work on it if we have finished other works on our hands.
And if you need it to be done urgently, please contact support@thinkgeo.com.
Regards,
Tsui