# Maps in app lab?

**URL:** <https://forum.code.org/t/maps-in-app-lab/30739>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-4-lesson-12\
**Created:** [September 24, 2019, 10:08pm UTC](https://forum.code.org/t/maps-in-app-lab/30739 "2019-09-24T22:08:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpaddock](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kpaddock](https://forum.code.org/u/kpaddock)\
**Post date:** [September 24, 2019, 10:08pm UTC](https://forum.code.org/t/maps-in-app-lab/30739/1 "2019-09-24T22:08:12Z")

</div>

Is it possible for students to embed a map (eg. google maps/apple maps) onto a screen when designing in App Lab?  
I have students who would like to be able to type in a location in a search bar and then go to a screen with the map of that location on it.

---

<div class="post-metadata">

**Author:** ![edavis](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/edavis/32/4927_2.png) [@edavis](https://forum.code.org/u/edavis)\
**Post date:** [September 25, 2019, 12:19am UTC](https://forum.code.org/t/maps-in-app-lab/30739/2 "2019-09-25T00:19:16Z")

</div>

I’m not 100% on either of these ideas, but I would first try to identify embed code for the HTML. If that’s not feasible, then maybe include a link to a blank target so it opens in a new page. Hope this helps. Anyone else have ideas?

---

<div class="post-metadata">

**Author:** ![mkmietowicz](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mkmietowicz/32/6322_2.png) [@mkmietowicz](https://forum.code.org/u/mkmietowicz)\
**Post date:** [September 26, 2019, 2:11am UTC](https://forum.code.org/t/maps-in-app-lab/30739/3 "2019-09-26T02:11:20Z")

</div>

Hi @kpaddock,

Are they trying to link to a place within Google Maps, or download 4-5 different locations that they choose from a dropdown? The question I’d ask them is, what input is the user giving to their app and how are they coding it to give output? Taking the string “New York” and knowing that means a very specific lat/long on a map is much different from coding, “if the user selects the third option, show the picture of the Statue of Liberty”. I don’t believe it’s possible to link to all of Google Maps from App Lab, but I’ll be happy to be proven wrong if someone knows differently.

Hope that helps,  
Michael K.

---

<div class="post-metadata">

**Author:** ![kpaddock](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kpaddock](https://forum.code.org/u/kpaddock)\
**Post date:** [September 26, 2019, 2:34pm UTC](https://forum.code.org/t/maps-in-app-lab/30739/4 "2019-09-26T14:34:42Z")

</div>

They are trying to link to a place within Google maps. If we cannot embed the map feature is it possible to have students on event click a button and be rerouted to the google maps app/webpage?

---

<div class="post-metadata">

**Author:** ![karenma](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/karenma/32/4924_2.png) [@karenma](https://forum.code.org/u/karenma)\
**Post date:** [September 27, 2019, 12:50am UTC](https://forum.code.org/t/maps-in-app-lab/30739/5 "2019-09-27T00:50:08Z")

</div>

Hi Katie,

Here is one way to reroute to google maps:  
onEvent(“googlemaps”, “click”, function() {  
open(“[https://maps.google.com](https://maps.google.com)”);  
});

I put a google map logo image on the screen with the id “googlemaps”  
A screen pops up “You are leaving this app…Do you want to open this website?”

Hope this is what they are trying to do,  
Karen

---

<div class="post-metadata">

**Author:** ![Teacher90](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@Teacher90](https://forum.code.org/u/Teacher90)\
**Post date:** [October 13, 2022, 4:42am UTC](https://forum.code.org/t/maps-in-app-lab/30739/6 "2022-10-13T04:42:49Z")

</div>

I have the same question, I would like to add an embedded map into the project for students, they do not want to open a separate tab to use the map.

---

<div class="post-metadata">

**Author:** ![wutadam](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/wutadam/32/7711_2.png) [@wutadam](https://forum.code.org/u/wutadam)\
**Post date:** [October 13, 2022, 12:06pm UTC](https://forum.code.org/t/maps-in-app-lab/30739/7 "2022-10-13T12:06:21Z")

</div>

You could try using a giant image and mapping the coordinates of the image to where you want to look.

h = height, w = width

The top left would be (0, 0).

The bottom right would be (w-320, h-450).

---

<div class="post-metadata">

**Author:** ![Teacher90](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@Teacher90](https://forum.code.org/u/Teacher90)\
**Post date:** [October 13, 2022, 9:30pm UTC](https://forum.code.org/t/maps-in-app-lab/30739/8 "2022-10-13T21:30:16Z")

</div>

Thankyou Muchly, my students will try that today
