I have an embedded Google Map which includes a marker. This marker is lost when I click through to detailed map -


i have embedded google map includes marker. marker displays fine in embedded map.

however when click "google" logo in bottom left corner of embedded map, takes me through map in full google maps site, marker seen. how can ensure marker carried through detailed google map?

map generated follows:

<div class="googlemap"><div id="mapdiv" class="googlemaps" style="width: 380px; height: 300px"><script>       function tpinitmap() {       var tpcoords = new google.maps.latlng('13.704312','100.492296');       var tpmap = new google.maps.map(document.getelementbyid("mapdiv"), {scrollwheel:false, zoom: 14, center: tpcoords, maptypeid: google.maps.maptypeid.roadmap});       var tpmarker = new google.maps.marker({position: tpcoords, map: tpmap, title: 'anantara bangkok riverside resort & spa'});       }     </script><script src="http://maps.google.com/maps/api/js?sensor=false&callback=tpinitmap"></script></div></div> 

i think cannot have indicated. click on logo of google links google maps , not application. google maps not know application , script added in application display marker. if want larger map must enlarge div of map. example with

<!doctype html> <html style="width: 100%; height: 100%;"> <head>  <script src="http://maps.google.com/maps/api/js?sensor=false"></script> 

    <div id="mapdiv" class="googlemaps" style="width: 100%; height: 100%;">     </div>          <script>             function initialize() {                 var tpcoords = new google.maps.latlng('13.704312','100.492296');                 var tpmap = new google.maps.map(document.getelementbyid("mapdiv"), {scrollwheel:false, zoom: 14, center: tpcoords, maptypeid: google.maps.maptypeid.roadmap});                 var tpmarker = new google.maps.marker({position: tpcoords, map: tpmap, title: 'anantara bangkok riverside resort & spa'});             }             google.maps.event.adddomlistener(window, 'load', initialize);          </script>  </body> </html> 

to view map in full screen make sure tags parent containers of map (html, body, ...., div of map) have size assigned width: 100%; height: 100%;


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -