ThinkGeo.com    |     Documentation    |     Premium Support

Refresh part of the layer

Hi,

We are in a project that has several elements on the map and in several moments we need to add (or update) objects to the screen.

Is it possible to update only the object’s region?

Currently we update the entire layer with the objects, but this is time consuming.

Thank you

Hi Danilo,

We need to know what’s the product you are using.

I think our map.refresh function have some different overloaded constructor, you can just refresh single overlay instead of refresh entire map. And in some of our products, you can refresh part area if it support.

Regards,

Ethan

I changed the post. We used the map for Android.

Exactly what I needed, refresh only the element area, not the overlap.

It’s possible?

Hi Danilo,

Do you mean you only want to refresh the exactly area in Map but not entire map/overlay? If yes. I can see we not support that. We only support Refresh Map based on Overlay.

Based on you requirement, I think you can consider to move the refresh layer to one overlay, and then refresh the entire overlay, it should be high performance if you only refresh one overlay.

You can tell us you scenario, we will give you some advice for the design.

Thanks
Mark

1 Like

Ok, Mark.

We’ll do it that way.

Thank you.

Hi Danilo,

Any question please let us know.

Regards,

Ethan

I noticed that there is a refresh method in LayerOverlay that receives a RectangleShape.

Does not this method work?

I tried to do this:

map.Overlays[MapConstants.OVERLAY_ELETRIC_POOL].Refresh(feature.GetBoundingBox());

Hi Danilo,

This API don’t works for Android version.

And I think it’s also unuseful for Android, because the tile number of Android is small, and this function still will refresh all tiles which touch target extent, so in most scenarios it still will refresh entire map.

Regards,

Ethan

Got it. I chose to separate my elements into other overlays, so the performance got better.

Thank you

Hi Danilo,

Thanks for your update.

Any question please let us know.

Regards,

Ethan