+ Post New Thread
Page 1 of 4 1234 LastLast
Results 1 to 15 of 49
Web Development Thread, Alternative to google maps API in Coding and Web Development; Hi all, Have just realised that google maps doesn't work properly on my site due to a PNG workaround script ...
  1. #1

    Join Date
    May 2006
    Posts
    1,319
    Thank Post
    101
    Thanked 25 Times in 18 Posts
    Rep Power
    26

    Alternative to google maps API

    Hi all,

    Have just realised that google maps doesn't work properly on my site due to a PNG workaround script I installed for IE. It seems to not work because of the copyright PNG image on the google map of all things. Anyway it seems there is no way around this so is there an alternative I can test out? Google maps was the only one I was aware of that I could use on my own site. Have looked an MSN but they don't appear to offer the same service.

    Cheers

    James

  2. #2

    Join Date
    May 2006
    Posts
    1,319
    Thank Post
    101
    Thanked 25 Times in 18 Posts
    Rep Power
    26

    Re: Alternative to google maps API

    *Bump*

    Does no-one know of any alternatives? I am supposed to be running a meeting with the governors tonight showing them the website, I'd ideally like some kind of interactive map, but i'm stuck for ideas. I'm pretty sure MSN does not offer the same service, at least I can't find anything that says they do.

  3. #3

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: Alternative to google maps API

    You could try Multimap.

  4. #4
    timbo343's Avatar
    Join Date
    Dec 2005
    Location
    Leeds/York area, North Yorkshire
    Posts
    3,095
    Thank Post
    314
    Thanked 296 Times in 206 Posts
    Rep Power
    121

    Re: Alternative to google maps API

    www.live.com have got their own alternative. Just like google tho.

  5. #5

    Join Date
    May 2006
    Posts
    1,319
    Thank Post
    101
    Thanked 25 Times in 18 Posts
    Rep Power
    26

    Re: Alternative to google maps API

    Meh, I tried to get it done on time, but these things have quite a learning curve to them and the meeting with the governors was at 4pm. It just had to do without lol. They didn't notice anything so it's all well with me.

  6. #6

    Join Date
    Feb 2007
    Posts
    86
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Alternative to google maps API

    Sorry Just joined and saw your comments. I would highly recommend windows live.
    The aerial photos of the uk are 100x better than googles.
    What were you trying to do with the maps?

  7. #7
    StewartKnight's Avatar
    Join Date
    Jun 2005
    Posts
    1,587
    Thank Post
    2
    Thanked 27 Times in 21 Posts
    Rep Power
    30

    Re: Alternative to google maps API

    I like Flash Earth

  8. #8

    Join Date
    Feb 2007
    Posts
    86
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Alternative to google maps API

    Hey if you want something really fun check this out then.
    http://www.isoma.net/games/goggles.html

    bewarned its addictive!!

  9. #9

    Join Date
    May 2006
    Posts
    1,319
    Thank Post
    101
    Thanked 25 Times in 18 Posts
    Rep Power
    26

    Re: Alternative to google maps API

    With google maps, you can use an API key to incorporate their maps into your own website. You can use funky javascript to make the map appear over the location that you want when someone loads your webpage. It saves you having to create a hyperlink to maps.google.com/755575whatevergoeshere. It makes your site look better this way.

    Unfortunately though, google maps does not work with my website. This is due to a unique script I installed for PNG images. The google copyright logo on the map in the bottom corner is a PNG image and it crashes the map.

    Webmans was the only suggestion where I could actually find similar features to google, where you can actually incorporate the map into your site (I managed to find one for yahoo as well).

    The problem I have is that it is going to take quite a long time to get the code correct (it did for the google maps and this code is different) and i'm not even sure it will work eventually for the same type of reason that googles' didn't work, so i'm reluctant to spend the time trying (I wish they were easier!). At the moment I just have a static image map on my contact page, which does the job but doesn't look as professional. At least I knew that was going to work though.

  10. #10

    Join Date
    Feb 2007
    Posts
    86
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Alternative to google maps API

    Hi James,
    Whats the url of your website and i will get a look for you mate.

    kind regards Plugged_in

  11. #11

    Join Date
    May 2006
    Posts
    1,319
    Thank Post
    101
    Thanked 25 Times in 18 Posts
    Rep Power
    26

    Re: Alternative to google maps API

    The site is *REMOVED* and the link to the google map (as I removed the link from the menu) is *REMOVED*

    Thanks
    (BTW it only doesn't work in IE as that is the browser the PNG image script was for)

  12. #12

    Join Date
    Feb 2007
    Posts
    86
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Alternative to google maps API

    OK mate this is what you need to do.
    POST in the url the school address in the following format as seen in the link code here:
    Code:
    <a href="map.php?name=The Oval Primary School&amp;address1=Whittington Oval&amp;address2=&amp;town=Birmingham&amp;county=West Midlands&amp;postcode=B33 8JG"><strong class="interactive_map">(Interactive Map)[/b]
    This link will open the map.php page.
    For this page i have done a hack the reads the lat and long off the google server from a postcode.

    PHP Code:
    <?
    function geoCode($address) {
      $gaddress = "http://maps.google.com?q=" . urlencode($address);
        $handle = fopen($gaddress, "r");
       $contents = '';
         while (!feof($handle)) {
            $contents .= fread($handle, 8192);
        }
        fclose($handle);
       ereg('viewport: \{center: \{lat: ([0-9.-]{1,}),lng: ([0-9.-]{1,})', $contents, $regs);
        $returnData['lat'] = $regs[1];
        $returnData['lon'] = $regs[2];
        return $returnData;
    }
    if(isset($_GET['lat']) && isset($_GET['lon'])){
        $lat = $_GET['lat'];
        $lon = $_GET['lon'];
    }else{
        $returnData=geoCode($_GET['postcode']);
        $lat = $returnData['lat'];
        $lon = $returnData['lon'];
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="keywords" content="" />
    <meta name="description" content="">
    <title>Virtual Earth / Google Maps - Map</title>
    <style>
    .clear {
        clear:both;
        height:1px;
        line-height:1px;
    }
    #contact_back {
        position: absolute;
        width: 170px;
        margin-top: 7px;
        margin-left: 550px;
        z-index: 1001;
        background-color: #0040C4;
        border: 1px solid #000000;
        text-align: center;
        height: 16px;
        font-size: 1.1em;
        text-decoration:none;
        cursor:pointer;
        cursor:pointer;
    }
    #contact_back a {
        color:#000000;
        text-decoration:none;

    }
    #contact_back a:hover {
        color:#000000;
        text-decoration:none;
    }
    </style>


    <script src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script>
    </script>
    <script>
        var map = null;
        var pinID = 1;
        
        function GetMap(){
            map = new VEMap('myMap');
            map.LoadMap(new VELatLong(<?= $lat;?><?= $lon;?>), 12 ,'r' ,false);
        }
        function FindLoc(Loc){
            map.FindLocation(Loc);
        }
        function GetInfo(){
            alert('The top edge of the map on the Web page is at pixel: '+map.GetTop());
            alert('The left edge of the map on the Web page is at pixel: '+map.GetLeft());
            alert('The latitude,longitude at the center of the map is: '+map.GetCenter());
            alert('The current zoom level of the map is: '+map.GetZoomLevel());
            alert('The map control version is: '+VEMap.GetVersion());
        }
        function AddPin(){
            var pin = new VEPushpin(
                                pinID,
                                map.GetCenter(),
                                "images/anchor_sm.jpg",//this is where you can use your own icon or pointer.
                                '<? echo (isset($_GET['name']) && $_GET['name']!="")?$_GET['name']:"";?>',
                                '<? echo (isset($_GET['address1']) && $_GET['address1']!="")?$_GET['address1']."
    ":"";?><? echo (isset($_GET['address2']) && $_GET['address2']!="")?$_GET['address2']."
    ":"";?><? echo (isset($_GET['town']) && $_GET['town']!="")?$_GET['town']."
    ":"";?><? echo (isset($_GET['county']) && $_GET['county']!="")?$_GET['county']."
    ":"";?><? echo (isset($_GET['postcode']) && $_GET['postcode']!="")?$_GET['postcode']."
    ":"";?>'
                                );
                            map.AddPushpin(pin);
                            pinID++;                
            }   
    </script>

    </head>
    <body onload="GetMap();AddPin()">

    <div id="content_header"> <div id="header_space">Contact Us  </div>
    <div id="sub_header"> Interactive Map  : </div>
        
            <div class="style1" id="contact_back" onclick="javascript:history.back(1)">&lt; Back to contacts page </div>
            
            <div id='myMap' style="position:relative; width:750px; height:500px;"></div>


            <div class="clear"> </div>
            
            </div>
            </body>
            </html>
    Let me know how you get on. 8)

  13. #13

    Join Date
    May 2006
    Posts
    1,319
    Thank Post
    101
    Thanked 25 Times in 18 Posts
    Rep Power
    26

    Re: Alternative to google maps API

    I think I got that right... maybe I misunderstood you though.

  14. #14

    Join Date
    Feb 2007
    Posts
    86
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Alternative to google maps API

    It looks about right to me.

    Now the reason why i choose virtual earth over google is because of the birds eye view.

    Go on click on it. See if you can see the school.

  15. #15

    Join Date
    Feb 2007
    Posts
    86
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Alternative to google maps API

    the other quick think in the code for the javascript you will see i have made a comment about the pin. Should be self explanatory.

SHARE:
+ Post New Thread
Page 1 of 4 1234 LastLast

Similar Threads

  1. Site Maps
    By enjay in forum How do you do....it?
    Replies: 8
    Last Post: 29th October 2007, 04:20 PM
  2. Microsoft live maps
    By Jobos in forum Educational Software
    Replies: 1
    Last Post: 3rd October 2007, 10:11 AM
  3. Google maps the stars
    By FN-GM in forum IT News
    Replies: 3
    Last Post: 23rd August 2007, 09:47 AM
  4. Interesting Google Maps Imagery
    By Geoff in forum Jokes/Interweb Things
    Replies: 3
    Last Post: 11th February 2006, 12:08 AM
  5. Anquet Maps
    By RobC in forum Educational Software
    Replies: 0
    Last Post: 6th December 2005, 02:53 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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