Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Aug 2014
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Excel Web Browser - Plotting Multiple Markers on Google Maps using UK Postal Code

    Hi all,

    This is my very first post, but until I was searching for help with my problem, I never knew this site existed, but I'll be having a good read through the forums!

    My issue. I have an Excel 2007 sheet with 4 Origin postcodes in cells A7 to A10, all the same postcode.
    In B7 to B10, I have 4 different Destination postcodes. I have a macro where I can simply highlight one of the destination postcode cells, click a button, and Google Maps does a 'Get Directions' instruction showing me the route from Origin to Destination.

    I want to keep the origin (1 postal code) in the centre of the map, and plot markers for each Destination postal code around it.

    Before I start uploading documents and codes, is this possible?

    I thank you in adbance for any help you guys are able to give.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 341 Times in 334 Posts
    Does the code at http://ramblings.mcpher.com/Home/exc...aps/mapmarkers answer your questions? in the section marked "The generated html file" it describes the default centering and how to change it.

    Steve

  3. The Following User Says Thank You to sdckapr For This Useful Post:

    leeroysilk (2014-08-05)

  4. #3
    New Lounger
    Join Date
    Aug 2014
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks Steve, however, I think when my other markers are plotted, my Origin will be centred anyway.

    Let me explain my purpose, it may help.

    I work for a hospital in the UK, and what I want is to plot the postcodes of the GP Practices we receive patients from in the local area. These will pretty much form a circular shape around the area, with our hospital in the middle.

    Whilst that link you sent me for centering seems like the way to go, I think my next step (multiple markers) will take care of this. If I am wrong, I will re-visit the link you included for default centering.

    Do you know of any way I can just dot markers on the map with the directions part?

    For example, if you googled 'Mechanics near [zipcode]', it would more than likely produce a local map with markers A, B, C....etc showing where the mechanics are. Thats what I'm looking to do.

  5. #4
    New Lounger
    Join Date
    Aug 2014
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    By the way, might I add I am using straight-forward UK postal codes, not long and lat.

  6. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 341 Times in 334 Posts
    I have not used Google Maps to change options for its output. The question seems to me to be more about Google Map than Excel, so you may need to look at a Google Map forum. Once you know the form that Google map needs to do what you want, the macro can be modified to put it in that form.

    Steve

  7. #6
    New Lounger
    Join Date
    Aug 2014
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'll take a look, thanks Steve

  8. #7
    Bronze Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    1,280
    Thanks
    46
    Thanked 250 Times in 230 Posts
    leeroysilk,

    Without seeing your workbook, it is difficult to see what exact solution you may need. This post may offer you a solution:

    http://windowssecrets.com/forums/sho...l=1#post912895

    Paying particular attention to the line of code that centers the map in the attached workbook:

    ActiveSheet.Pictures.Insert( _
    "http://maps.googleapis.com/maps/api/staticmap?center=" & location & "&zoom=" & zoom & "&size=" & size & "&maptype=" & view & "&sensor=false").Select

    where Location= city hall, philadelphia,pa or a specified latitude/longitude
    zoom= 17
    size= 600 x 600
    view= Roadmap

    This link below supplied by RG helped me create the maps. Although the site has changed, follow the links to find the info you require
    Google Maps API

    HTH,
    Maud

  9. #8
    New Lounger
    Join Date
    Aug 2014
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This is what I have so far - still needs work, but this is the essence of what I was trying to achieveExcel Google Mapper (3).xlsm

  10. #9
    New Lounger
    Join Date
    Aug 2014
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hope it works - one of the guys at work put together a google map URL for me, but I think it might be stored on our servers here.

    If the link is broken, heres what it looks like:

    mapper_img.docx

Posting Permissions

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