ThinkGeo.com    |     Documentation    |     Premium Support

Render with Custom Layout Page

I am having issues. I have my map on a partial view page. When I go to run Html.ThinkGeo().Map(mapname).Render(); It will re render the entire page. Is there anyway I can tell it not to render out the layout page? Would it be better for me to instead just put the map onto my main page?

Hi Joshua,

It looks the RenderPartial will be loaded when entire map refresh, so I want to know more detail about your scenario or some sample code, do you want to delayed load the map?

And put our map in main page can reduce the chance to met some issues.

Regards,

Don

I am currently in the design process. I am looking for different ways I can use the map. I am mostly just curious if it is possible to put the map in a partial view, without it re rendering the entire master page. For the layout I am trying to describe, I have a _Layout page that drives the layout of all my pages. I have my home/index page that is my main page. On this page I tell it to:

Html.RenderAction(“Map”, “Map”);

This renders the partial page “Map” based on the controller MapController.

The entire MapController is as follows:
@{
Html.ThinkGeo().Map(Model.Map).Render();
}

When run this code, it renders the _Layout page along with map, and I am not sure why. I understand if putting the map is not an option, I am just wondering if it is.

Hi Joshua,

Thanks for your detail description, I think render the _Layout page maybe because the design of our MVC map, if you have some other design to put the map please don’t do that like this.

Regards,

Don