Wednesday, May 9, 2018

UsingGMaps

To use Google Maps in an app, one needs to get an access code
from Google. Below, I am using that of W3 Schools. Three settings have to be
adjusted initially: latitude, longitude and zoom level. Below, to
view St-Jean-sur-Richelieu and Montreal Island on opening.


                                          *     *     *

Still thinking about 'elementFromPoint'. It picks up the topmost element.

                   
                                          *     *     *
Before thinking about a Google Maps app, one does need to be clear about
how the original works. It centers the map on a set of Longitude and Latitude
coordinates. Wanting to pursue, with Saint-Jean sur Richelieu as the center of a my map,
I found that Wikipedia gave me coordinates expressed in degrees and minutes, rather than
the decimal form I needed. Found a site to do the conversion, cited below.

https://www.fcc.gov/media/radio/dms-decimal

So my town, at zoom level 15 specified by the code on W3 Schools, looks like this.


Let's run a scenario, wherein I am a bemused tourist sitting at McDonald's in need
of services. The map needs to center on the restaurant. On the conventional map, I can
find the coordinates if I type the address: it will show up in the URL. I can also right click
for a 'what's there', and GMaps will show it to me. This is useful if to know if I am planning
a private app.

https://www.online-tech-tips.com/computer-tips/find-longitude-latitude/

The public App for St-Jean:

 Getting the coordinates:



In the W3 tutorial, I can show many maps at once, and see combine the info. The
'hybrid' view is interesting for driving.


Here, a bird's eye of McDonald's. On the private app, this is possible because  - holding down control - I will move in and out with the zoom.


But like with the public app, if I zoom from a mouse over, I can easily end up in the middle of nowhere.


 https://www.w3schools.com/graphics/tryit.asp?filename=trymap_basic_many