I'm trying to create a store locator and having trouble finding information that supports Umbraco 7. All the packages I've found through Google and this site appear to be outdated and do not work with Umbraco 7.
I need to be able to provide a location (I will already have Lat/Long or can Geocode a string from the server, eg: "123 Main St., City, State") and fetch my Umbraco content that falls within a specific radius of this location. I will have the address as fields within the Content Type.
Can anyone help point me in the right direction or let me know how to set this up? Thanks in advance for your help!
I did see the Google Maps package supported Umbraco 7. That would allow me to geocode and have a latitude and longitude for each store. However, I am still unsure how to search for these within a specific distance.
For example, let's say I have Document Type Store, which has a latitude and longitude stored on the node. A user enters a location which I can geocode and get a latitude and longitude for that as well.
How do I query for all Stores that are within a 25 mile radius of the user's input location?
Bump - Any help here? I'm new to Umbraco and not sure where to start. Can anyone at least point me in the right direction of how to search for nodes of a Content Type within a given radius? This is a common task in any CMS, but not sure how to go about it with Umbraco.
Store Locator in Umbraco 7+
I'm trying to create a store locator and having trouble finding information that supports Umbraco 7. All the packages I've found through Google and this site appear to be outdated and do not work with Umbraco 7.
I need to be able to provide a location (I will already have Lat/Long or can Geocode a string from the server, eg: "123 Main St., City, State") and fetch my Umbraco content that falls within a specific radius of this location. I will have the address as fields within the Content Type.
Can anyone help point me in the right direction or let me know how to set this up? Thanks in advance for your help!
Hi Matt and welcome to our.
Perhaps you could use the angular google maps package to do what you are trying to do https://our.umbraco.org/projects/backoffice-extensions/angulargooglemaps/
Hope this can help you a step further.
/Dennis
Hi Dennis,
I did see the Google Maps package supported Umbraco 7. That would allow me to geocode and have a latitude and longitude for each store. However, I am still unsure how to search for these within a specific distance.
For example, let's say I have Document Type
Store
, which has a latitude and longitude stored on the node. A user enters a location which I can geocode and get a latitude and longitude for that as well.How do I query for all
Store
s that are within a 25 mile radius of the user's input location?Thanks again!
Bump - Any help here? I'm new to Umbraco and not sure where to start. Can anyone at least point me in the right direction of how to search for nodes of a Content Type within a given radius? This is a common task in any CMS, but not sure how to go about it with Umbraco.
Hi Matt,
I have not used this control before, but the process of "getting the data" really is the easy bit.
If you have set some doctypes and created content based on those types (say that are geo nodes).
So you are trying to calculate the distance between a given point (say a postcode) and fixed position geonodes .
One way is to convert the long lats to miles. Something like this:
If you applied this method against all your geonodes you can build a collection of geonodes with a distance value from your fixed point.
I would then be a question of querying the nodes and applying a parameter (distance from fixed point).
Package the results in JSON and apply to a mapping provider like google to show the positions on a map.
I hope it gets you going.
is working on a reply...