ID:2212713
 
(See the best response by Dayoak.)
So can I change the map interface at runtime?? like open a window and use its map as default?? and then switch back to basic map upon closing the window??

I'm thinking about changing is-default but is it safe and what problem may occur??
Best response
This should be fine to do, to my knowledge (and testing) it doesn't cause an issue switching between default map elements.

I did find you need to set the other map to default=false, or switching back and forth won't work. Disabling the non-default map will also reset whats drawn to it, as not doing so will leave it as a still image of what was previously seen.
// Switch to the first map
winset(src, null, "window2.map2.is-default=false;window2.map2.is-disabled=true;window1.map1.is-disabled=false;window1.map1.is-default=true;")
// Switch to the second map
winset(src, null, "window2.map2.is-default=true;window2.map2.is-disabled=false;window1.map1.is-disabled=true;window1.map1.is-default=false;")
Modify the window and map element names as needed.
Thanks for the reply and also for that tip about is-disabled.
IMO you'll get the best results from putting your map in a pane. Then you can simply move that pane to different windows as needed.
In response to Lummox JR
Lummox JR wrote:
IMO you'll get the best results from putting your map in a pane. Then you can simply move that pane to different windows as needed.
This is definitely a more elegant/reliable solution to the issue, especially if there needs to be more than 2 windows.

Applying that particular solution, Victorqr:
Add a window, make it a pane. Name this window "map_pane".
Add a map element to map_pane. Name this element "map", and make it the default.
Add a child element to any window and name it "map_child". The child which the map should appear in by default should have "map_pane" set in its left/top setting.
// No additional winset properties are needed, just set the pane to a different child's left property
winset(src, "window.mapchild", "left=mappane;")
Enjoy a crudely made webm example.
hmm yeah so instead of changing is-default I could just move the pane to another child.

btw Dayoak thx for your time to make a video :)

So In my case what I'm trying to achieve is that when a player opens the empire manager window an interactive mini-map appears and player can click on a province and then its information is displayed.
My approaches are:
*Somehow add an image and be able to click it
*Use the screen datum (but that only works with rectangle hud objects as far as I know)
*Create a map element and move the usr.loc to a place in the map where I have the minimap and the provinces are obj which can be clicked.
something like this:
http://wiki.totalwar.com/images/3/34/Etw_dsh_035.jpg

do you guys have any ideas for a better approach??
3rd one works fine but the only problem is that game has to be paused because main map no longer works
Screen objects work on a second map without it having to be the default. You could always just use two maps, but populate one entirely with HUDs instead of building directly on the map.