Copied to clipboard

Flag this post as spam?

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


  • Paul Griffiths 370 posts 1021 karma points
    Mar 14, 2016 @ 17:43
    Paul Griffiths
    0

    Search within a given radius using Lat/Long values

    Hi all,

    I have installed the angular google maps package (awesome btw) which allows cms editors to choose a location and it will store the longitude, latitude and zoom of the specified location. Great!

    Secondly I have created a custom html form and implemented the geolocation plugin which also uses the google api to provide auto complete on an input field. When the user selects their location I store the longitude and latitude of the location in a hidden form field and pass the values using a get request.

    Thirdly, (and the part which I'm struggling on) is how can I compare the hidden long last values with the values stored in the angular Google maps data type? I also have a radius select field on my form and was hoping to search within a specified radius of the given long/lat.

    I was wondering if anyone has managed to implement something similar? Or whether this can even be achieved? I was thinking that I can maybe use ezSearch (another awesome package) as a base?

    Would love to know your thoughts on this one and whether I have any chance of being able to achieve what I want?

    Many thanks Paul

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Mar 15, 2016 @ 07:48
    Jeroen Breuer
    0

    Hello,

    There is a package which does something like this: https://our.umbraco.org/projects/developer-tools/seek-and-destroy/

    You can find the source code here: https://github.com/TimGeyssens/LocatorRazorStyle

    Hope it helps.

    Jeroen Breuer

  • Paul Griffiths 370 posts 1021 karma points
    Mar 15, 2016 @ 08:18
    Paul Griffiths
    0

    Hi jeroen,

    Thanks for getting back to me. I will certainly take a look at this package 😄. I'm struggling to make progress so hopefully it will help me out. Fingers crossed.

    Thanks again for the info

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft