Register  |  Login
ThinkGeo - GPS Tracking and Mapping Solutions  |  Visit the Wiki  |  Find us on: Twitter Facebook Google+ LinkedIn

Discussion Forums

The online community for users of Map Suite GIS components

Drawing problem
Last Post 09-21-2012 12:08 PM by Gary. 21 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages Not Resolved
ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
07-13-2012 07:46 AM

I'm having a problem with the drawing of my layers. It happends on different shape files and when you pan the map it goes away.

I've attached a screenshot of the problem.

I'm using version 6.0.0.47 of the web edition.

Any idea what might be going wrong?

 

Thanks!

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
07-13-2012 11:29 AM
Hello Elm

Thanks for your post, I didn't see this problem before, you are using ShapeFileFeatureLayer? Could you please provide a sample with your data to me to recreate this problem?

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
07-13-2012 02:07 PM

 Hey Gary,

 

I'm indeed using a ShapeFileFeatureLayer. I have it on different ShapeFileFeatureLayers.

Can I mail you the ShapeFile? I rather not post it in public.

 

Thanks.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
07-13-2012 02:13 PM

 The weird thing is when I pan the map around I sometimes get this (3 out of 5 times). I've checked this in the Developer tools in Chrome and open the same image again in a new tab and it looks correct. So it gets drawn correctly sometimes but not always.

 

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
07-16-2012 01:55 PM
Hello Elm,

You can email to forumsupport@thinkgeo.com, I will try your sample to recreate this problem.

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
07-19-2012 05:14 AM

 Hi Gary,

 

I've mailed the shape file yesterday.

 

Regards,

 

Elm

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
07-19-2012 05:47 PM

 Hello Elm,

 
Thanks for your data, I did some test on it, looks like everything is ok, could you please provide your sample to me?
 
Regards,
 
Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
07-25-2012 10:50 AM

 Hey Gary,

 

I've mailed you yesterday with a link to download my sample application.

 

Thanks,

 

Elm

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
07-26-2012 03:42 PM
Hello Elm,

I got the sample, thanks, but in the code, it needs two shape file, one is 'media.shp' and one is 'media_detail.shp', I only got second one from your previous email, could you please check this?

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
07-27-2012 01:36 AM
Hey Gary,

all the shape files should be included in the project in the shapes directory?


Regards,

Elm
ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
08-13-2012 05:02 AM

Hey Gary,

do you have any news on this issue?

 

Thanks!

 

 

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
08-31-2012 09:13 AM

 Hi Gary,

 

it has been a while since I heard about this issue. Is it still being investigated?

 

 

Thanks!

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
09-06-2012 05:22 AM
Should I post a ticket on this?
GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
09-06-2012 07:54 PM

 Hello Elm,

 
 I'm sorry for delay, I did fully test with your sample and data, I am keep pan the map about 15 minutes, but can't recreate your problem, here I made a video should you how I did the test, if I misunderstanding something, please feel free to let me know.
 
 Regards,
 
 Gary

 

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
09-14-2012 09:57 AM

 Hi Gary,

 

I've send some mails where the problem is more visible.

 

Thanks!!

 

 

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
09-14-2012 03:15 PM
Hello Elm,

Thanks for your further information, yes I can see the problem in the online sample you send, but still I can't recreate in my side, I tried using 6.0.0.47 today but the same result.

But I noticed two things in the online sample, one is I got an exception said projection has problem, but only one time get this exception, can you check the projection?

And another thing is the shape file rendered very slow in the online sample, I think it's not very big, isn't it?

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
09-17-2012 03:58 AM
Hi Gary,

I think I'm getting closer to the problem. I've changed the example to only use 2 layers. Both ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
I've also added the Overlayswitcher.

The media layer is about 4mb (139polygons) and the TA layer is about 5mb (20 000 polygons).

When you switch on the overlays separately there is no problem. But when you turn both overlays on and pan the map a bit the problem occurs.
When you see the spikes on the map and turn one overlay off and pan the map again the problem goes away.

I've checked my layers many times with the IsValid() feature from 6.0.122 version but it makes no difference. The shapes seem to be correct.

Does this help you any further?

Thanks,

Elm
ElmUser is Offline
Level 1
Level 1
Posts:20
Avatar

--
09-20-2012 03:12 AM

Gary,

 

is there anything I can do to speed this up? I would like to resolve this as soon as possible.

 

Thanks,

 

Elm

 

GaryUser is Offline
MVP
MVP
Posts:1914
Avatar

--
09-20-2012 05:39 PM
Hello Elm,

Sorry for delay, we are still working on this, we have find that in DictionaryValueStyle drawcore, the feature become invalid after draw, but we are still dig in it.

And if you are hurry for some problem, you can submit a ticket about this, ticket has higher priority and will handle first.

Regards,

Gary

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

EdgarUser is Offline
MVP
MVP
Posts:715
Avatar

--
09-21-2012 03:46 AM

Hi Elm,

After days searching, we finally find out the problem, the Projection is not thread safe, and it will go wrong in multithread mode sometimes, and here are two ways to solve your problem, 

1), Override the class ManagedProj4Projection and add a locker, but this will not get the advantage of multithread.


    public class MyProjection : ManagedProj4Projection
    {
        static object lockObject = new object();

        protected override Vertex[] ConvertToInternalProjectionCore(double[] x, double[] y)
        {
            lock (lockObject)
            {
                return base.ConvertToInternalProjectionCore(x, y);
            }
        }

        protected override Vertex[] ConvertToExternalProjectionCore(double[] x, double[] y)
        {
            lock (lockObject)
            {
                return base.ConvertToExternalProjectionCore(x, y);
            }
        }
    }

        public MyProjection GetLambert72ToGoogleProjection()
        {
            MyProjection _proj4Lambert72 = new MyProjection();
            _proj4Lambert72.InternalProjectionParametersString = MyProjection.GetEpsgParametersString(31370);
            _proj4Lambert72.ExternalProjectionParametersString = MyProjection.GetGoogleMapParametersString();
            return _proj4Lambert72;
        }

2), Set different instance of projection for each layers to avoid the multithread issue. e.g.


layer1.FeatureSource.Projection = GetLambert72ToGoogleProjection();
layer2.FeatureSource.Projection = GetLambert72ToGoogleProjection();

Hope it helps,

Edgar

 

Need to know how to do something with Map Suite? Check our Wiki Code Samples Library and view the source code of any sample right in your web browser.

You are not authorized to post a reply.
Page 1 of 212 > >>


Active Forums 4.2