cf_googleMap v.1.3 prerelease
I am working on wrapping up the 1.3 revision of cf_googleMap. There are a bunch of documentation changes and a few new features I have added. Some of the biggest changes for this project is releasing this on RIA Forge. As a sneak peak I have gone ahead and posted the pre-release 1.3 version on my site and RIA forge.
Based on your 'example 7' which allows a sliding point to select lat/long, I managed to weave a custom lat/long finder into my CFcms for a local travel info site - when entering a 'point of interest', the admin user can popup a map, slide the pointer to the location of the article subject, and the lat/long get saved to the db for use on the display side. This is gonna be sooo s w e e t.
However, one thing I have not seen in my adventures so far - is there any way to use cf_googleMap to show a point based on an address string alone? ( like the 'search the map' form on the google maps page itself )
I see you have a geocoder but as of yet don't quite see how to use that (I'm sure it's there somewhere but heck, it is almost 2am my time!)
Thanks for this great bit of code... looking forward to whatever else you can possibly find to keep adding to it!
Your the second person today that has asked for that feature in the tag. While this is possible with the Google Maps API this has not yet been integrated into the tag. I will make sure to add this in the next build. However in the meantime there is a geo.cfc that contains a method for geocoding an address.
- John
thanks for the follow up.
I took a look at the geo.cfc but didnt see much in the way of documentation. Any chance you can point me in the right direction, to an example of the 'call' to this cfc to turn an address into a set of coordinates?
Thanks SO much for this EXCELLENT piece of CF engineering. Truly impressive.
http://www.blayter.com/john/cf_googlemap/exampleGe...
The 'view source' on yours is just as good... thanks again.
Oh, and, I hope you still want the
Logitech 980356-0403 Stereo USB Headset 250
coming your way shortly...
> Oh, and, I hope you still want the Logitech 980356-0403 Stereo USB Headset 250
Sweet, thanks!
I have spent quite a bit of time exploring the options in cf_googlemap, still very pleased and impressed but a few quick q's for you, if I may...
- when showing multiple points on a map, and some of those are very close together, is there any way to specify which one will be 'on top'? I have a business listing system in the works, and if an address is not specified, I am using the center of town. Thing is, I also have a general marker showing the center of town, which I would like to always be on top no matter what... possible?
- your geo example was very helpful - thanks again. However, the google encoder itself seems pretty finicky about what it can digest. I struggled for quite a while with the error 'Could not perform web service invocation "geocode_address". ' and finally got around it by using cftry/cfcatch, and a set of default coordinates with a js alert when the address returns errors from the encoder. Is there a better known way around this?
- also, is there any way to maximize the likelihood that google maps will recognize an address? Here in utah we have strange coordinate-based street addresses like "234 North 100 East"... it doesnt seem to like this very much at all, though some of them are working just fine. What seems strange is that some addresses that return errors in the geocoder still return succesful results when using the 'get directions' dialog on the map... I guess I assumed these 2 functions (geo encoder / get directions) would use the same rules... but apparently not... or am I missing something?
Thanks again for a great piece of work... really pleased.
One more quick q - have you done anything with the 'GoverViewMapControl()' function? http://www.econym.demon.co.uk/googlemaps/examples/... is one example... but the one I really like has the 'overview' control in the lower corner, imbedded into the main map. Not wanting to push my luck.. what you have given us right now is excellent to say the least... but I really like that little control box!
I am currently buried under a stack of work and some remodeling at home. I should have some time this weekend to answer your questions. I just didn't want to leave you hanging.
Thanks
Jonh
A.) I have not found a way per say to what icon takes precedence over another. Some things that you may want to try is by the pointName in the googleMapPoint tag having the city center point named something like “aaaaCityCenter”. It also might help if you pass the city center points into the tag last.
Q.) Your geo example was very helpful - thanks again. However, the google encoder itself seems pretty finicky about what it can digest. I struggled for quite a while with the error 'Could not perform web service invocation "geocode_address". ' and finally got around it by using cftry/cfcatch, and a set of default coordinates with a js alert when the address returns errors from the encoder. Is there a better known way around this?
A.) Download the 1.3 version of the tag. The geocode function inside of the geo.cfc is much better and should give you better results. You now pass in each part of the address as a argument and it does a try/catch removing parts of the address until it gets a geocode.
Q.) Also, is there any way to maximize the likelihood that google maps will recognize an address? Here in utah we have strange coordinate-based street addresses like "234 North 100 East"... it doesnt seem to like this very much at all, though some of them are working just fine. What seems strange is that some addresses that return errors in the geocoder still return succesful results when using the 'get directions' dialog on the map... I guess I assumed these 2 functions (geo encoder / get directions) would use the same rules... but apparently not... or am I missing something?
A.) The old geocoder function was based off of geocoder.us that was built off of public databases. The new function uses the Google geocoder. I am not really sure a better way if Google is not returning anything to you for the geocode. Have you tried changing the North to N and East to E in the address?
Q.) have you done anything with the 'GoverViewMapControl()' function?
A.) No I have not but I must say that is wicked cool. I will add that to the feature request list.