Hello,
I created custom style to draw multiple images in the same layer and noticed that images around 180 degrees do not appear on the map.
Please see attached sample code for more details.
Thanks,
Inna
DrawWorldImage.zip (12.1 KB)
Hello,
I created custom style to draw multiple images in the same layer and noticed that images around 180 degrees do not appear on the map.
Please see attached sample code for more details.
Thanks,
Inna
DrawWorldImage.zip (12.1 KB)
Inna,
I got your sample. I run it but it is just a blue map. What do I need to do to see the problem happening? Thank you.
I could not attach full project, because of forum’s size restriction.
You will need to place Countries02.shp (and idx) to bin\debug\ Resources\map folder and also copy Images folder to bin\debug.
In my sample I added InMemoryFeatureLayer with couple of points around 180. As you can see from the image none of the points are visible.
Inna,
Thank you for your additional information. I can clearly see the problem now. I have tasked the Development team to fix the bug. I will let you know as soon as we have the fix. Thank you.
Hello Inna,
Sorry for waiting, please try the latest version to fix the problem, also please check the attached sample code, it fix the point disappear problem.
Regards,
Gary
Issue_MS3-7583.zip (450 KB)
Gary,
Your attached sample is working, but it also introduced a new (or rather old) bug.
I am using custom zoom levels to display a map in the full extent. In the past I had a problem defining custom zoom levels, but it was fixed (kind of) by Johnny in this post.
But now, I am again, experiencing same problem with a map. Attached sample code for your reference.
Thank you for your help,
Inna
CustomZoomLevelsBug.zip (52.6 KB)
Hi Gary,
Do you know when the fix will be available?
It is really important for me to display a features around 180 and be able to use CustomZoomLevels.
Inna
Hello Inna,
Sorry for delay, to resolve the problem mentioned in 2 posts, you just need to change the maxScale of the default zoomLevelSet to “591330330.94349861”, in other words, just need to change the implementation of “SetCustomZoomLevels” method to:
private void SetCustomZoomLevels()
{
wpfMap1.ZoomLevelSet = new GoogleMapsZoomLevelSet();
double maxScale = 591330330.94349861;//wpfMap1.ZoomLevelSet.ZoomLevel01.Scale;
for (int i = 0; i < 20; i++)
{
wpfMap1.ZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(maxScale));
maxScale /= 2;
}
}
Please let me know if it's not working, we did this with your code, and it's ok now.
Regards,
Gary
Hi Gary,
It does not help me. I need to adjust maxScale to display a full extent(-180 to 180) and on a different resolutions.
Inna
Hi Inna,
The problem occurs when the maxExtent is unable to be dived by the world width of one tile without reminder. Just as we know, the maxExtent is constant, for example, the maxExtent of DecimalDegree should always be “-180 180, -90 90”, and the screen width of the tile is constant as well, 256. In other words, all these can be explained by equation below:
Width of MaxExtent = n * resolution * screen width of one tile (be 256 here)
(Note: n is the number of the tiles which fills the max extent)
From the above, we know the resolution would be constant if the “screen” width of one tile is equal to 256. In other words, the scale will be fixed. That’s why we suggest you change the maxScale to “591330330.94349861” which is calculated by equation above.
I’m a bit confused with your words “…and on a different resolutions”, can you detail your scenario to us? If that’s true, I think the width of tile 256 is not suitable.
Thanks,
Zhang
Hi,
My task is to display entire world (by longitude) in a full screen and no “virtual” worlds. Screen can have different resolutions(1920x1080, 1280x720 and etc.) and different DPI.
I am working with map in meters (Mercator projection) and using WrapDateLine mode.
Thank you for all your help,
Inna
Hi,
Any help would be appreciated…
Thanks,
Inna
Please give me a status of this post. Is it fixable?
Hello Inna,
Sorry for delay, yes, that’s a bug, but we are unable to do this enhancement to our products. In other words, we didn’t do any changes to our code before to fix your another problem, just provide a workaround to you, maybe something wrong here.
Just as Johnny mentioned in that thread earlier, the error occurs once the width of full extent doesn’t dive the tile width with no remainder. That’s why he said, we need to recalculate a new MaxScale for the you, I think maybe you have some confusion here, the resolution here we mentioned means the ratio between world screen and map screen, it should doesn’t matter with the screen setting of the computer, such as screen resolution, we also did test on 2 different machines, 1680*1050 and 1024 * 768, both works fine except ZoomLevel13 after applying the workaround I provided:
private void SetCustomZoomLevels()
{
double maxScale = 591330330.94349861;//wpfMap1.ZoomLevelSet.ZoomLevel01.Scale;
for (int i = 0; i < 20; i++)
{
wpfMap1.ZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(maxScale));
maxScale /= 2;
}
}
Now just wondering why it doesn’t work for ZoomLevel13, seems like we need re-calculate the scales following the equation Johnny mentioned before:
Width of MaxExtent = n * resolution * screen width of one tile (be 256 here)
(Note: n is the number of the tiles which fills the max extent)
Regards,
Gary
I don't want to sound like a broken record, but your code does not help me.
I want to see only “real” world, without any “virtual” worlds:
But you code gives me:
Please help me. It is very important issue for me, without it I will not be able to use this map.
Hello Inna,
Sorry for the inconvenience, I will assign this problem to let the development team working on this. They will post the result here as soon as they get the result.
Also for some really tough problem, if you can create a ticket for that, it will great improve the priority and fast to resolve.
Regards,
Gary
Gary,
I opened a new ticket.
Thank you for your advice.
Inna
Hello Inna,
Thanks for your ticket, we have fix part of this problem, please check the ticket for details, also when all the issue have fixed, I will post the final result here too.
Regards,
Gary