HTML and CSS Reference
In-Depth Information
Listing 3.8. app.js-Using geolocation to insert a map of the user's location
When the user clicks the Location Map button on the rich-text editor toolbar, the browser
will request permission for the application to access their location data, as shown in figure
3.4 .
Figure 3.4. The browser will request the user's permission to enable the Geolocation API. If access is denied, the
browser will behave as though it doesn't support geolocation.
If the user chooses to allow access to their location, a map with a marker on their position
will be added to the editor, as illustrated in the screenshot in figure 3.5 . In order for the
map to appear, you must click inside the editor's text box before clicking the Location Map
Search WWH ::

Custom Search