Question: I would like to implement a simple 2D adventure game for desktop and android using QML(Qt Modeling Language).

The game will have different places, like e.g. kitchen and cellar. A place has typically a background image, and then some objects in that place. These might be some things you need to find and collect, or can also be simple sprites, like a bird flying through the room.

I have written a small first version with only one place, that works fine. Now I would like to extend the game.

I would like to implement the places isolated and separately, so I can easily switch between the places, e.g. you go from the kitchen to the cellar, and that places can easily be added.

I was looking for an appropriate way to do this in QML only, but it seems there is none.

Does anyone have a good idea, how to do this? Google hasn't helped me so far.

Answer: 
Well, the "code" for Google maps for AngularJS resides in the second script tag. This script depends on some functionality from the first script (lodash), which is why the latter is loaded first.

The AngularJS code wraps the Google maps API. So, yes, you can use the Google API by itself, but you won't have some of the easier declarative tags that the Angular API gives. For instance,

```
<google-map center="{latitude:80.001, longitude:125.43}">   
</google-map> 

```

Will actually generate a map and display it. The HTML tags for this (angular directives) are defined in the second script file. 

If you didn't use this, you could still write the javascript code required to generate a map according to the Google API:

```
<script type="text/javascript">
  function initialize() {
    var mapOptions = {
      center: new google.maps.LatLng(-34.397, 150.644),
      zoom: 8
    };
    var map = new google.maps.Map(document.getElementById("map-canvas"),
        mapOptions);
  }
  google.maps.event.addDomListener(window, 'load', initialize);
</script>

```

Just two different styles of coding. With the Angular approach, you can largely define functionality in the HTML itself depending on your use case.

Regarding the errors that you're seeing, it seems like your app can't find the script files above. You are replacing the paths indicated above with your actual paths, correct?
I'm using this module for a long time and I wrapped it in my own directive.
The reason why you might want to use this module is because loading the google maps is of course asynchronous and you ends to handle all the promises before you'll be able to use the Google maps API, so this module wraps this and a lot of other usages in maps. It also expose directives you might want to use.