# Draw elements ontop of MapView / NativeViewHost

**URL:** <https://forums.fusetools.com/t/draw-elements-ontop-of-mapview-nativeviewhost/3176>\
**Category:** How-to Discussions\
**Created:** [April 29, 2017, 10:09am UTC](https://forums.fusetools.com/t/draw-elements-ontop-of-mapview-nativeviewhost/3176 "2017-04-29T10:09:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bishaka\_Samuel](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bishaka_samuel/32/234_2.png) [@Bishaka\_Samuel](https://forums.fusetools.com/u/Bishaka_Samuel)\
**Post date:** [April 29, 2017, 10:09am UTC](https://forums.fusetools.com/t/draw-elements-ontop-of-mapview-nativeviewhost/3176/1 "2017-04-29T10:09:22Z")

</div>

```auto
Fuse Version : Fuse version 0.36.1 (build 12010)
Os Version : Microsoft Windows [Version 10.0.14393]
Device Os : Android 6.0
Device : Huawei Honor 8

```

I have this code

```auto
<Page ux:Class="MapPage">
	<Panel>
		<Text Margin="0,10,0,0">Test text</Text>
	</Panel>	
	<Panel>
		<NativeViewHost>
		    <MapView Latitude="59.911567" Longitude="10.741030" Zoom="10">
		        <MapMarker Latitude="59.911567" Longitude="10.741030" Label="Fuse HQ"/>
		    </MapView>
		</NativeViewHost>		
	</Panel>
	<Panel>
		<Text Margin="80,10,0,0">Test text</Text>
	</Panel>
</Page>

```

According to the draw order, the first panel should be ontop of the mapview, but it’s rendered behind it as shown below;

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/R5EoPlO6dyWo-image-1493460227209.jpg)

Dunno if this is unique to MapView or NativeViewHost, but i need to draw alot of control elements on top of that map that will be animating and all that, wanted to know if there’s something I’m missing

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [April 29, 2017, 10:23am UTC](https://forums.fusetools.com/t/draw-elements-ontop-of-mapview-nativeviewhost/3176/2 "2017-04-29T10:23:47Z")

</div>

Hi Samuel,

as it’s stated in [NativeViewHost docs](https://www.fusetools.com/docs/fuse/controls/nativeviewhost), it is always drawn on top of everything else. That’s a platform limitation.

However, there is a solution to what you’re trying to do. You should simply move the elements you want on top of the `MapView` inside of your `NativeViewHost`, like so:

```auto
<Page ux:Class="MapPage">
    <Panel>
        <NativeViewHost>
            <Panel>
                <Text Margin="0,10,0,0">Test text</Text>
            </Panel>    
            <MapView Latitude="59.911567" Longitude="10.741030" Zoom="10">
                <MapMarker Latitude="59.911567" Longitude="10.741030" Label="Fuse HQ"/>
            </MapView>
        </NativeViewHost>        
    </Panel>
</Page>

```

---

<div class="post-metadata">

**Author:** ![Bishaka\_Samuel](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bishaka_samuel/32/234_2.png) [@Bishaka\_Samuel](https://forums.fusetools.com/u/Bishaka_Samuel)\
**Post date:** [April 29, 2017, 10:27am UTC](https://forums.fusetools.com/t/draw-elements-ontop-of-mapview-nativeviewhost/3176/3 "2017-04-29T10:27:17Z")

</div>

Oh yeah, had just seen that but doesn’t that turn the panel into a native control?.. would the same animation and fuse goodies work?.

Anyway will wade around the platform and figure it out.

In an ( sort of ) un-related note… how come the mapview renders as though its in a `ClientPanel`?

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [April 29, 2017, 10:32am UTC](https://forums.fusetools.com/t/draw-elements-ontop-of-mapview-nativeviewhost/3176/4 "2017-04-29T10:32:48Z")

</div>

_Most_ of Fuse’s GL elements render just fine inside of `NativeViewHost` and work just like they do outside of one. You might run into some issues if you try something exotic though, and if you do please post a new thread.

As for the other question, it’s unrelated to this thread. The answer to that is probably some levels up from the `ux:Class` code you have shown.
