LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Is it possible to return to the initiating program after a call to google.maps (https://www.linuxquestions.org/questions/programming-9/is-it-possible-to-return-to-the-initiating-program-after-a-call-to-google-maps-4175697013/)

pizzipie 06-28-2021 05:25 PM

Is it possible to return to the initiating program after a call to google.maps
 
Hi,

I am trying to run google maps from an 'html' program and have it return back to the initiating program. At present the return from google.maps is to the Desktop. PATH: index.html ---> gMapsFrontEnd.html ---> comes back to Desktop.

Does the google maps program return something that I can access and call the original index.html program?

index.html

Code:

<div id="index8" >
<p><a href="googleMaps/gMapsFrontEnd.html">
<!--<p><a href="https://maps.google.com">-->
<img src="../images/googleMaps.png" alt="Google 9999 Maps" width="125" height="125">
</a><h2>Google Maps</h2></p>
</div> <!-- index8 -->

gMapsFrontEnd.html

Code:

<body>       
 
               
<div class="header">
        <img src="../images/googleMaps.png" alt="Google Maps" width="250" height="167" />
        <h2>Google Maps</h2>
</div> <!--header-->
                       
<div id="mybody">
       
                        <li><br /><p><input type="button" class="hov" id="btn1" value="Go to Google Maps."
                                                                onclick="window.location.href='https://maps.google.com'"></p>
                                               
                                                                                               
                                                <p><input type="text" class="hov" id="btn4" value="Exit"       
                                                                onclick="timer=setTimeout('move()',500)"></input><br /></li></p>                                                               

</div> <!-- mybody -->

</body>


astrogeek 06-29-2021 12:49 PM

I do not understand what you are asking.

What is the "initiating program" and what would it expect as a return value?

Is this in a browser? How are you calling index.html that the "return from google maps is to the Desktop"?

Please tell us what you are trying to accomplish and how, exactly, you are doing it.

Please revisit the Site FAQ for guidance in asking well formed questions. Especially visit the link from that page, How to Ask Questions the Smart Way for discussion of things to consider when asking others for help.

boughtonp 06-29-2021 04:54 PM


 
I'm likewise baffled, but wonder if whatever is being attempted here is either in ignorance of the Google Maps API, or an effort to get around paying Google?

Maybe OpenStreetMap or Mapbox are better choices.

(Gnome Maps is an example of a desktop application powered by OpenStreetMap.)


pizzipie 06-29-2021 09:04 PM

1 Attachment(s)
Thanks for your replies,

This has nothing to do with the Google maps API.

If you enter https://maps.google.com you can do whatever you want with google.maps, right? When you are finished you will be returned to the computer Desktop you started from.

Now look at the attached screenshot. If you click on the Google Maps Icon you will be taken to the above site. When you are done the return is the computer Desktop as above. I made the gMapsFrontEnd.html to try to have the return to my control where I want it to go back to my index.html page and be able to click on another icon, however it too returns to the computer Desktop thus the reason for my question.

R

boughtonp 06-30-2021 07:24 AM

Well no, you can't do "whatever you want" with Google Maps, but that's an unrelated subject. It's not even clear if Google Maps itself is relevant to what you might be asking, or just an example.

http://www.catb.org/~esr/faqs/smart-questions.html#beprecise

You haven't provided any context on the environment you're using, the program that is (possibly) misbehaving, where the posted HTML comes from, how/what interactions are performed, etc.

The screenshot implies a mobile device, but you've made no mention of that...


pizzipie 06-30-2021 01:56 PM

This is going nowhere. Thanks much for your time on my behalf!

Quote:

Well no, you can't do "whatever you want" with Google Maps, but that's an unrelated subject.
By this I mean do whatever the program allows you to.

I think the answer is to just 'page' back to the calling program.

Again, Thanks,

R

dugan 06-30-2021 02:51 PM

The "target=_vblank" attribute on an A tag causes it to open in a new tab or window. That's the most obvious way to get what I think you're asking for.

Opening Google Maps in an IFrame is another option.

astrogeek 06-30-2021 03:03 PM

Quote:

Originally Posted by pizzipie (Post 6262506)
If you enter https://maps.google.com you can do whatever you want with google.maps, right? When you are finished you will be returned to the computer Desktop you started from.

Now look at the attached screenshot. If you click on the Google Maps Icon you will be taken to the above site. When you are done the return is the computer Desktop as above.

Enter it where?

From the screenshot I have to guess that the desktop icon, if that is what it is, opens your browser with the given URL. Then when you close it you are just closing your browser. It doesn't "go back to" your Desktop, it is simply closed and so no longer covers your desktop from view. If you want to keep your browser open and go to another URL, like your local index.html then you would have to enter that URL directly or provide a link to click from your browser's bookmarks or menu bar.

But the main point being, if my guess is in the ballpark, it is just a browser so you have to browse normally to the next desired URL, not close it.

If your browser supports it, you might just encode the icon to open with multiple tabs - one for the maps and one for your local index.html, then when done with the maps just close that tab. Which browser is this?

ondoho 07-01-2021 01:47 AM

Beyond the already voiced calls for more clarity & information, I'd like to add that the 2nd code example from post #1 is very poorly formatted.
It would've been nice if OP would have removed some whitespace to make it more readable.
Since the chances of succesfully defining, then solving the problem are so slim from the onset, I didn't really see a reason to do that myself.

pizzipie 07-01-2021 03:02 PM

1 Attachment(s)
Dugan:
Quote:

Opening Google Maps in an IFrame is another option.
I tried that. See DuganIframe.png attachment. I read the "Learn More" paragraph and it is just as you say below.

Quote:

The "target=_vblank" attribute on an A tag causes it to open in a new tab or window. That's the most obvious way to get what I think you're asking for.
This solved my problem exactly, Perfect!:

Code:

<div id="index8" >
<p><a href="https://google.com/maps" target="_blank">
<img src="../images/googleMaps.png" alt="Google Maps" width="125" height="125"></a>
<h2>Google Maps</h2></p>
</div> <!-- index8 -->



All times are GMT -5. The time now is 08:13 AM.