Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Google Map as TargetURL Centers Wrong Within Frame

Last post 08-28-2008 20:02 by peterklein86. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-23-2008 18:25

    Google Map as TargetURL Centers Wrong Within Frame

    Can anyone advise me how to make a Google Map center properly within the frame of an Infragistics WebTab? Here's an example ...

    http://www.peterklein.net/  (navigate: Photography > Places > NYC > Map)

    showing how the map centers relative to the browser and not the WebTab. I found a couple of links discussing what I think are the same problem ...

    http://forums.asp.net/t/1207085.aspx
    http://groups.google.com/group/Google-Maps-API/browse_thread/thread/2710b15f3d76ec2/67413d33e7fd0e74?tvc=2&q=asp.net

    yet I confess I don't fully understand the javascript scenarios discussed. I'll post below the html from my Google Map page which is generated by an export from the program RoboGEO.

    Thanks if anyone has advice about this.

    Map page code ...

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head>

    <title>NYCMap</title>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <meta name="description" content="NYCMap - powered by Google Maps" />

    <meta name="generator" content="RoboGEO v5.4" />

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAewLjz_kmTwF6agx5mipVJRSX99LV8rw0h8bwsLJz1iwYdESyThT3MJoRe6a83D6FfW7R20octwUtuw" type="text/javascript"></script>

    <style type="text/css">

    html, body, #map

    {

    width: 100%;

    height: 100%;

    }

    body

    {

    margin-top: 0px;

    margin-right: 0px;

    margin-left: 0px;

    margin-bottom: 0px;

    font-family: Verdana, Arial, sans-serif;

    font-weight: normal;

    font-size: 11px;

    }

    #infotitle

    {

    text-align: center;

    font-weight: bold;

    padding-bottom: 10px;

    font-size: 12px;

    color: #CC0000;

    }

    #infodesc

    {

    float: left;

    padding-right: 5px;

    width: 180px;

    }

    #infoimg

    {

    text-align: center;

    }

    </style>

    </head>

    <body onunload="GUnload()">

    <div id="map"></div>

    <script type="text/javascript">

    //<![CDATA[

    // check for compatibility

    if (GBrowserIsCompatible()) {

    // call the info window opener for the given index

    function makeOpenerCaller(i) {return function() { showMarkerInfo(i); };

    }

    // open an info window

    function showMarkerInfo(i) {

    markers[i].openInfoWindowHtml(infoHtmls[i]);

    }

    // create the map

    var map = new GMap2(document.getElementById("map"));

    map.addControl(new GLargeMapControl());

    map.addControl(new GMapTypeControl());

    map.addMapType(G_PHYSICAL_MAP);

    map.addControl(
    new GScaleControl());

    map.addControl(new GOverviewMapControl());

    map.setCenter(new GLatLng(40.782348125, -73.9688675), 11, G_NORMAL_MAP);

    // add the markers

    var request = GXmlHttp.create();

    request.open("GET", "map.xml", true);

    request.onreadystatechange = function() {

    if (request.readyState == 4) {

    var xmlDoc = request.responseXML;var markerElements = xmlDoc.getElementsByTagName("marker");

    markerElementsLen = markerElements.length;

    photos = new Array(markerElements.length);

    markers = new Array(markerElements.length);

    infoHtmls = new Array(markerElements.length);

    for (var i = 0; i < markerElements.length; ++i) {

    photos[i] = new GLatLng(parseFloat(markerElements[i].getAttribute("lat")), parseFloat(markerElements[i].getAttribute("lng")));

    markers[i] = new GMarker(photos[i],{title:markerElements[i].getAttribute("title")});infoHtmls[i] = markerElements[i].getAttribute("html")

    map.addOverlay(markers[i]);

    GEvent.addListener(markers[i],
    'click',makeOpenerCaller(i));

    }

    }

    }

    request.send(
    null);

    }

    else {

    document.getElementById("map").innerHTML = "Your web browser is not compatible with this website."

    }

    //]]>

    </script>

    </body>

    </html>

     

    • Post Points: 20
  • 08-26-2008 9:06 In reply to

    Re: Google Map as TargetURL Centers Wrong Within Frame

    dear

    i m also facing a problem related to google maps can u help me

    the problem is


    i had created a page in asp.net 2.0 using visual studio2005 and placed a ultra webtab and placed a
    textbox control into this tab control
    i am using google maps api(which only support javascript acc. to my knowledge),
    now i want to access the textbox value trough javascript, but not able to do this
    kindly help me out , i m in so much trouble

     regards,

     

    • Post Points: 5
  • 08-28-2008 20:02 In reply to

    Re: Google Map as TargetURL Centers Wrong Within Frame

    I figured his out by reading this post ....

    http://forums.infragistics.com/forums/p/7658/34234.aspx#34234

    • Post Points: 5
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems