Results 1 to 9 of 9

Thread: Google Maps

  1. #1
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default Google Maps

    When I copy and paste any of these Google Map examples and change them to a .aspx extension (with a new map key for the relevant domain), they don't work in FF or Safari... any ideas?

    If I change the Helm website settings to run HTML pages as ASP.NET pages - then again, the Google Map examples stop working. The Google examples work as htm, html, and asp - just not ASPX, which is my chosen language!

    I'm certain this shouldn't be the case - and wondered if there were any settings on RFH I'm not aware of...?

    http://code.google.com/apis/maps/doc...les/index.html

    Many Thanks.

  2. #2
    Join Date
    Oct 2005
    Location
    Scotland
    Posts
    229
    Thanks
    7
    Thanked 12 Times in 8 Posts

    Default

    Google maps works fine on RFH with .net pages.

    A couple of my sites use it: http://www.seasonworkers.com/Profile...ience-153.aspx

    Do you have a link to your .net page that isn't working?

  3. #3
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    I can confirm I have google maps within .net page which are displayed within an iframe.

  4. #4
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    try either of these in FF and let me know your results, both are the same code:


    Dot Net Example

    HTM example


    thanks for your time, can't figure out what I'm doing wrong...

  5. #5
    Join Date
    Mar 2005
    Location
    Isle of Man
    Posts
    1,261
    Thanks
    3
    Thanked 24 Times in 24 Posts

    Default

    Not sure what the problem is, the only real difference I can see between the pages that might be interfereing with things is that the dot net pages are served as application/xhtml+xml whilst the standard page is text/html. you may need to use cdata escaping, eg:
    Code:
    <script type="text/javascript">
    //<![CDATA[
        function initialize() {
          if (GBrowserIsCompatible()) {
            var map = new GMap2(document.getElementById("map_canvas"));
            map.setCenter(new GLatLng(37.4419, -122.1419), 13);
            map.openInfoWindow(map.getCenter(),
                               document.createTextNode("Hello, world"));
          }
        }
    //]]>
    </script>
    just a wild guess

  6. #6
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    Done both of those, and still no show in FF...

  7. #7
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    Please install firebug for firefox so that you can check for any javascript errors. Doing this you will notice errors.

    First item you need to do

    http://maps.google.com/support/bin/a...29&topic=10789

    Then this leaves you with this issue

    http://code.google.com/p/gmaps-api-i.../detail?id=530

    The issue is what Nick suspected so 50 points to Nick.

    So in .Net you need to do Response.ContentType = "text/html"

    Hope this works for you and does not break something else :-)

    James

  8. The Following User Says Thank You to askjim For This Useful Post:

    RFH Reseller: creativeworks (12th October 2008)

  9. #8
    Join Date
    Jun 2005
    Location
    Tunbridge Wells, Kent
    Posts
    206
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    Thanks for all the tips, the content-type was the best lead...

    In a moment of past genius, I was delivering the content type as application/xhtml+xml within the global.asax.

    So through all my efforts of not understanding why a page smothered in html tags and content type, was still delivering xml...

    Looks like 'past me' set a trap for 'present me'...! lets hope 'future me' will remember this lesson...

  10. #9
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    Well it was a good exercise in advance of needing to do some the same for some clients at work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Google Chart API
    By MooMF in forum Development Support
    Replies: 1
    Last Post: 16th May 2008, 09:13 AM
  2. Google Maps - bandwith question
    By webb0 in forum General Technical Support
    Replies: 1
    Last Post: 9th February 2008, 10:19 AM
  3. Problems using .GPX & .MAPS Files
    By tom_vian in forum General Technical Support
    Replies: 12
    Last Post: 5th October 2006, 09:06 PM
  4. Google AdWords
    By davidbending in forum Community Feedback and Suggestions
    Replies: 1
    Last Post: 5th September 2006, 12:19 PM
  5. Google Pack
    By CS New Media in forum General Technical Support
    Replies: 2
    Last Post: 8th January 2006, 01:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •