How can I get the HTML which is used to display a TWebGMaps?
I tried CompleteHtmlFile, but that was an empty string.
----------------------------------
Reason, I cam coding a server. A user enters a URL in their browser, my program, running on the server, hanldes the request and returns an HTML page for the browser to disply.
I want that page to contain a lot of things for the uer's browser and I want to embded a google map in it.
I could build a Gogole map request myself, from my database, but if I can use TWebGamps it is less for me to code.
So, is there an easy way to get the HTML which would represent the TWebGmap? I don't mind if I have to sub-class to get at private members.
Hi,
Example:
Thanks for the help, Bart.
I am curious - doesn't Google return HTML to the component? If so, how can I get that?
The Google map is dynamically generated using JavaScript.
I'm not sure if there is a straightforward way to retrieve the resulting HTML.
Unfortunately this functionality is beyond the scope of the WebGMaps control.
I am confused (it happens often). Surely a browser sends an HTTP request to the Google maps API and revives, in return, some HTML? Yes, that HTML might be mixed with JS, but it contains what the client browser needs to display the Google map. Or did I miss something?
I think that is out of the scope of the purpose of TWebGMaps.
Thanks for the reply. I will look into the code & see whether it is easier to subclass TWebGMaps or just to implement my own interface with Google Maps.
A slightly different question. The database is on my server, so any
client browser needs to go there so that the server can build a request
to Goggle Maps.
My original question question was if I could capture the return from Google Maps.
Now I want to ask it I can easily get at the request which you send to goggle?
If I have that, I can send it to the client and the client can ask for
the Google Map (it sounds awkward, but I want to use data from the
server's database to add markers & polylines to the map).
hi, it doesn't matter now. I quickly wrote my own code to build the JS required. So, my server looks at its database, builds an HTML page with the relevant JS and returns that to the browser.