Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pat 56 posts 147 karma points
    Jan 14, 2012 @ 19:16
    Pat
    0

    Google Maps

    Hey,

    I have installed the Google Maps package, set the location using the tab on my content node and published it, but nothing shows at all on my page. I have used a few things that people have posted on here as solutions yet none seem to work at all.

    Everything is defined properly, but any code I have used for it that people have posted as solutions to other identical problems isn't helping so far.

    Any help will be appreciated.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jan 15, 2012 @ 12:55
    Jeroen Breuer
    0

    Could you have look at what data is stored in your umbraco.config file? The coördinates should be in there.

    After you selected a location do you also click on the pin in Google maps and than click on use these coördinates?

    Jeroen

  • Pat 56 posts 147 karma points
    Jan 15, 2012 @ 17:01
    Pat
    0

    Yes I used the pin to do that, nothing changed on the webpage.

    I deleted the code/macro stuff as couldnt get it to work. The we page template just has <umbraco:Item field="googleMap" runat="server" /> in the DIV at the min, so shows just the co-ords. Tried some of the stuff on here about google maps that others have done but nothing worked.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 15, 2012 @ 17:34
    Jan Skovgaard
    0

    Hi Pat

    So you did not get any coordinates returned when you used the umbraco:Item to fetch the stored value? Did you install the "Google maps location" package or did you install the "Google maps datatype" - and on what version of Umbraco?

    If you installed the Google maps datatype you will need to render the google map yourself using a macro and some JS magic using the google maps API.

    Looking forward to hear from you.

    /Jan

  • Pat 56 posts 147 karma points
    Jan 15, 2012 @ 17:55
    Pat
    0

    Hi Jan,

    I installed the Google Maps Datatype, and I am using Umbraco 4.7.

    I have coordinates showing yes, my code is literally just:

    <div id="googleMap" class="gMap" style="border:solid;">
       <umbraco:Item field="googleMap" runat="server" />
      </div>

    at the moment, which shows Co-Ords only.


    Pat

  • Ansar 181 posts 291 karma points
    Jan 15, 2012 @ 18:26
    Ansar
    0

    Hi Pat,

    Google map data type on the back office will just store the latitude, longitude and zoom values to the doc type property..

    You will need to build the Google Map your own using these values in the front end website..

    Here is the info on how to do that http://blog.darren-ferguson.com/2009/3/14/quick-tip-displaying-maps-on-your-umbraco-website.aspx

    Regards,
    Anz

     

  • Pat 56 posts 147 karma points
    Jan 16, 2012 @ 12:28
    Pat
    0

    Thanks Anz.

    Am a bit of a newbie when it comes to this, the blog post is a bit confusing in terms of where to put the different sections of code?

  • Ansar 181 posts 291 karma points
    Jan 16, 2012 @ 12:46
    Ansar
    0

    Hi Pat,

    The code sample shown in the blog is Google Map2 Family.. its recommended to use Gmap3 for new projects..

    but I will just explain below how you can just make the code from blog work

    1. Signup for GMap2 API Key http://code.google.com/apis/maps/signup.html

    2. Refer the following script in the HTML head

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

    Replace YOUR API KEY above with the Key you generated on step 1

    3. Refer jQuery in your head

    4. Include the second piece of code in the head.. inside a <script> tag

    5. Add the first piece of code from Blog in the body where you want the Map to show..

    Hope it helps :)

    Regards,
    Anz

  • Pat 56 posts 147 karma points
    Jan 16, 2012 @ 13:49
    Pat
    100

    Hi Anz,

    I have generated the key.

    Refered that script line into the masterpage header.

    By refer to jQuery in head, you mean add that first big block of code to a js file and link it?

    Included the second big piece of code in the head.

    Added that first small piece into the template for the page it is going on.

     

    Nothing seems to change, though. Got to have it implemented by tomorrow, am going nuts lol

  • Pat 56 posts 147 karma points
    Jan 16, 2012 @ 14:10
    Pat
    0

    I have it working!!!

    Tried a bit of code which DS wrote in this thread http://our.umbraco.org/projects/backoffice-extensions/google-maps-datatype/bug-reports/21252-See-only-Coordinates

    Thanks a lot Anz for you help :)

  • Ansar 181 posts 291 karma points
    Jan 16, 2012 @ 19:42
    Ansar
    0

    Great to know its working good.,. But I strongly recommend you to use GMap3, which provides street view etc and the code structure is almost same...

Please Sign in or register to post replies

Write your reply to:

Draft