Simple Google Maps with ionic 2

-1

Talk to people, okay? Next, I'm developing an ionic 2 application that will need google maps. However the use is not via geolocation, it is just the presentation of the map with a pre-defined address (or long + lat).

I found a lot of google maps, but they all consist of using plugins ... Is there any way to do what I need in a simple way?

    
asked by anonymous 27.07.2016 / 21:40

2 answers

0

You've made an excellent choice over Ionic 2.

Let's talk a little about plugins. They are built elements with the focus on connecting your JavaScript to Java, which is the language that devices can understand. Quite simply by using a native plugin like Google Maps plugin from Ionic 2 or even the Original from Cordova, you will get full performance from a native feature because by running the Android application .apk your JS will communicate with the native features of the device and so will run no problem whatsoever requested. The other solution is if you yourself do something in Java that communicates your JS to the device, but it will still be a Plugin, only made by you. The only thing I do not indicate is to use ionic / cord Google Maps for web, which also works, but limits you and leaves the application slower. I hope I have helped and good studies with Ionic 2, it has grown a lot in the Brazilian market.

    
26.01.2017 / 18:50
0

You need a plugin to do this, see this that is recommended in the official framework website

link

link

The documentation is clear, consistent. Here are examples on the second link doing what you want, displaying a point in google maps, like this:

map.addMarker({
  position: {lat: ..., lng: ...},
  title: "Hello Cordova Google Maps for iOS and Android",
  snippet: "This plugin is awesome!"
}, function(marker) { ... })
    
08.03.2018 / 13:31