# Trying to create the mapview!

**URL:** <https://forum.codewithmosh.com/t/trying-to-create-the-mapview/3687>\
**Category:** Uncategorized\
**Created:** [March 30, 2021, 4:30pm UTC](https://forum.codewithmosh.com/t/trying-to-create-the-mapview/3687 "2021-03-30T16:30:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzironman](https://avatars.discourse-cdn.com/v4/letter/j/54ee81/32.png) [@jzironman](https://forum.codewithmosh.com/u/jzironman)\
**Post date:** [March 30, 2021, 4:30pm UTC](https://forum.codewithmosh.com/t/trying-to-create-the-mapview/3687/1 "2021-03-30T16:30:48Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/5/5d445ab00fce6d907928af0f0aa728ab10dac1b2.jpeg)

When I click handlesubmit it sets the latitude and longitude of (mylocation) for initialRegion of mapview.

I want to add a dynamic marker as well.

how do i put a dynamic coordinate inside a marker?  
I tried to pass ‘mylocation’ as a initial value but it gives me an error of  
(latitude and longitude should have an initial value)

since the initial value of ‘mylocation’ is undefined, it would only have a value if i click ‘handlesubmit’
