LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-28-2021, 05:25 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Rep: Reputation: 12
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>
 
Old 06-29-2021, 12:49 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
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.
 
Old 06-29-2021, 04:54 PM   #3
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,597

Rep: Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545

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.)

 
Old 06-29-2021, 09:04 PM   #4
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Original Poster
Rep: Reputation: 12
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
Attached Thumbnails
Click image for larger version

Name:	Selection_048.png
Views:	12
Size:	78.4 KB
ID:	36692  

Last edited by pizzipie; 06-29-2021 at 09:05 PM.
 
Old 06-30-2021, 07:24 AM   #5
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,597

Rep: Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545
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...

 
Old 06-30-2021, 01:56 PM   #6
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Original Poster
Rep: Reputation: 12
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
 
Old 06-30-2021, 02:51 PM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,219

Rep: Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309Reputation: 5309
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.

Last edited by dugan; 06-30-2021 at 03:11 PM.
 
Old 06-30-2021, 03:03 PM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by pizzipie View Post
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?

Last edited by astrogeek; 06-30-2021 at 03:08 PM.
 
Old 07-01-2021, 01:47 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
Old 07-01-2021, 03:02 PM   #10
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Original Poster
Rep: Reputation: 12
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 -->
Attached Thumbnails
Click image for larger version

Name:	duganIframe.png
Views:	11
Size:	24.5 KB
ID:	36724  
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Avoid Google Maps with GNOME Maps on GNU/Linux LXer Syndicated Linux News 0 04-15-2018 06:33 AM
Google maps versus Nokia's OVI maps Aquarius_Girl General 8 05-30-2011 04:26 AM
Continue Script Execution After Initiating a Program in a Client senthilmuthiah Linux - Newbie 3 03-25-2009 06:06 AM
LXer: Google Maps and Google Earth KML overlays LXer Syndicated Linux News 0 10-29-2008 04:30 AM
How do I keep an executable from terminates after the initiating shell terminates mr.v. Linux - Newbie 8 01-20-2007 02:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration