Source language: Translate to:

Google Maps Without a plugin

Share sample pubs, scripts, etc. with other NeoBook users

Moderator: Neosoft Support

Google Maps Without a plugin

Postby adelsysadmin » Sun Apr 13, 2008 12:10 pm

Add Google Maps to your application without a plugin and for free.


What you need
    A WebSite
    Neobook :)
    A Google Account



1. Signing up for an API KEY

First go and signup for a Google Maps API Key here
http://code.google.com/apis/maps/signup.html

You must have a valid website because the API Key will just work on your WebSite.

2.Adding the Map to your website

After signining up for an API Key, you need to write the script to display the Map on a page on your website so you can use it in your NeoBook application. Don't worry i already done it, just go to http://www.matsoftwares.com/neobook/tutorials.php?GMaps, to generate the script. After generating copy the script and pase it in your WebSite Editor and save it as html or anything, then upload it.

Goto the page using your webbrowser and test it, if it works keep reading if not go through the steps again or contact me.

3.Using the map in NeoBook
I already done an Example Pub you can download it from here http://www.matsoftwares.com/neobook/tutorials/GMaps.pub


MoreInfo

If you know about JavaScript, then you would like to check this

http://code.google.com/apis/maps/documentation/
Last edited by MatSoft on Tue Jun 17, 2008 10:28 am, edited 2 times in total.
adelsysadmin
 
Posts: 45
Joined: Wed Mar 26, 2008 5:39 am

Postby Alex » Sun Apr 13, 2008 12:37 pm

Excellent thanks very much


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Wrangler » Mon Apr 14, 2008 9:21 am

Thanks, Hassan. This is great. I have a program I can use this in. Will give it a go.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby SabrinaE » Sat Jul 05, 2008 1:36 am

salut,

j'ai testé mais ça ne marche pas. le code html généré pat matsoft ne fonctionne pas.

quelqu'un as t'il réussi ?

j'ai pu avoir un autre code sur le net et disposer sur
http://testmax974.ifrance.com/index.html

mais hélas le controle avec neobook ne se fait pas, normal, il faut ré écrire le code. besoin d'aide help!

merci
SabrinaE
 
Posts: 182
Joined: Fri Mar 10, 2006 11:51 am

Postby adelsysadmin » Sun Jul 06, 2008 12:04 pm

hello maxoureunion

I think the problem is in your webhosting, try to put the script in a blank page, your page contains ads and other objects and this may be causing the problem, and also make sure to register for an api, and when you register an api key make sure to enter the same website as where the script is, example the script is in http://testmax974.ifrance.com, when google ask you to put the website enter the same one.


If you want a good and free webhosting with no ads try http://www.awardspace.com
adelsysadmin
 
Posts: 45
Joined: Wed Mar 26, 2008 5:39 am

Postby David de Argentina » Sun Oct 26, 2008 12:38 pm

Hi All,

I found (and depurated them) this webpage that connect with Google Earth.

The HTML code is:

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
  <base href="http://www.alianzo.com/" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title></title>
  <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAXqdFft2BjqI2YTtcprVQtBR3kzLWgU_xyENiINK_49jHRiLpzBRu6wr55cHyRq3QDD3iI6Q3ZQRsvg&hl=en" type="text/javascript"></script>
</head>

<body>

  <div id="map" style="width: 600px; height: 400px;"></div>


  <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-2013618-16");
    pageTracker._initData();
    pageTracker._trackPageview();
  </script>

  <script type="text/javascript">
            
  if (GBrowserIsCompatible())
  {
    var map = new GMap2(document.getElementById("map"));

    // Map type:
    //map.setMapType(G_NORMAL_MAP);
    map.setMapType(G_HYBRID_MAP);
    //map.setMapType(G_SATELITE_MAP);

    map.addControl(new GScaleControl());
    map.addControl(new GLargeMapControl());   
    map.addControl(new GMapTypeControl());
    map.addControl(new GOverviewMapControl());


    map.setCenter(new GLatLng(40.5474611148012, -3.6419677734375), 1);
    for (i=0;i<document.getElementById('map').getElementsByTagName('img').length;i++)
    {
      if (document.getElementById('map').getElementsByTagName('img')[i].src.indexOf('smc.png')!=-1)             
      {
      document.getElementById('map').getElementsByTagName('img')[i].src="/images_bloggersnet/navSmall.png"
      }
   
    }
    var icon = new GIcon();
    icon.image = "/images/txapela.png";
    icon.shadow = "/images/itzala.png";
    icon.iconSize = new GSize(22, 26);
    icon.shadowSize = new GSize(45, 25);
    icon.iconAnchor = new GPoint(11, 26);
    icon.infoWindowAnchor = new GPoint(18, 0);
    //var center = new GLatLng(40.5474611148012, -3.6419677734375);
    //marker1 = new GMarker(center);
    //map.addOverlay(marker1);
  }
            
  </script>
</body>

</html>


I think any JavaScript guru could create the neobook actions in order to set the center, the markers and the zoom level..

Please, if any know how to do this, please... tell me the way...

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

salut

Postby SabrinaE » Wed Nov 05, 2008 10:28 pm

voici un petit exemple de map monde intégré dans neobook.
le fichier zip (exe+pub) peut être télécharger apres 60 sec d'attente

http://www.gigasize.com/get.php?d=mdmgcy4q8hf


la carte map utilisée est à l'adresse suivante:
http://maps.google.com/maps?f=q&output= ... oom=0&zp=O

Zoom avant=I
Zoom arrière=O

Est= R
Nord= U
Sud= D
Ouest= L
SabrinaE
 
Posts: 182
Joined: Fri Mar 10, 2006 11:51 am

Thankyou

Postby ajhunt » Wed Mar 31, 2010 1:52 pm

Thanks guys - will have a look at that - maybe just what is needed.

Thanks again for your time and replys

Regards
Anthony
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom


Return to Sample NeoBook Pubs

Who is online

Users browsing this forum: No registered users and 2 guests