+ Post New Thread
Page 4 of 4 FirstFirst 1234
Results 46 to 49 of 49
Web Development Thread, Alternative to google maps API in Coding and Web Development; K, i'm a little bit confused as to where the code has to go. Putting it where I assumed you ...
  1. #46

    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

    K, i'm a little bit confused as to where the code has to go. Putting it where I assumed you meant didn't work

  2. #47

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

    Re: Alternative to google maps API

    Something like this after the head.

    PHP Code:
    <script src="http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js"></script>
    </script>
    <script>
    // If the browser is Firefox get the version number
    var ffv = 0;
    var ffn = "Firefox/"
    var ffp = navigator.userAgent.indexOf(ffn);
    if (ffp != -1) ffv = parseFloat(navigator.userAgent.substring(ffp + ffn.length));
    // If we're using Firefox 1.5 or above override the Virtual Earth drawing functions to use SVG
    if (ffv >= 1.5) {
      Msn.Drawing.Graphic.CreateGraphic=function(f,b) { return new Msn.Drawing.SVGGraphic(f,b) }
    }



        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.gif', 
                                '<? 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>

  3. #48

    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 code was in the right place, I got it to work after a -hard- refresh.

    Thanks so much for your help.

  4. #49

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

    Re: Alternative to google maps API

    No worries mate.
    I may call on you for help one day.
    I have PM'd you my private msn address.



SHARE:
+ Post New Thread
Page 4 of 4 FirstFirst 1234

Similar Threads

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