Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Google map for android

$
0
0

@mathiasRobinson wrote:

Hello guys.

Ive beent trying to get my google map into my app.
theres four similar maps at http://robotten-nao.dk/taxaapp.

I have just tried using the cordova-plugin-googlemaps but i cant get this to work.
the script it shows there has to be placed in the html file, but it dosnt look like that works (wont even display an alert() from my template html)

Then ive tried putting the code into my controller but there it dose not regonize the tag plugin.

when its just to display the map with lines, could it then be better just to use an iframe and load the page into my app?

<script>
    var map;
    document.addEventListener("deviceready", function() {
      var div = document.getElementById("googleMap");

      // Initialize the map view
      map = plugin.google.maps.Map.getMap(div);

      // Wait until the map is ready status.
      map.addEventListener(plugin.google.maps.event.MAP_READY, onMapReady);
    }, false);

    function onMapReady() {
      var button = document.getElementById("button");
      button.addEventListener("click", onBtnClicked, false);
    }

    function onBtnClicked() {
      map.showDialog();
    }
</script>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>