Sometimes you want a user to enter an address which later on can be used to display it on a map. Now you want to make sure, that the user sees what the the map will look like and where his entered address is shown on the map.
This comes in very handy for those users who always seems to forget to enter the whole address.
The new item type Plugin “Address (validation and display map)” gives you an easy way to provide a text-field where the user can enter his address and immediately sees a map and a marker for the address.
This Plugin also has some advanced attributes which you can use to get even more information out of the Google Geocoding API.
See this documentation for examples of what the Google Geocoding API is capable of.
You can find Documentation to that Plugin over here.
How does it work?
The item is a standard input item which takes the entered address, as soon as the user leaves the field, and sends it to the Google Geocoding API.
The first matching address returned by the Geocoding API is displayed in a Google Map.
Download
I put that Plugin on www.apex-plugin.com, there is also a demo over here.
Hi Peter,
great work!
Is it allowed by Google to use Google Maps in APEX apps or is there a fee to pay to Google?
Hi Niels,
according to the comments on this blogpost http://www.telnet80.com/2010/09/address-validation-using-google-maps.html (especially the one from Thor Mitchell) there should be no legal problems in using the Plugin as provided (because Geocoding is used together with a Map).
Please note, that this Plugin isn’t meant to replace commercial address validation services (e.g. Deutsche Post), because there is no guarantee that your address is known or mapped correctly.
I don’t see the plugin up on apex-plugin.com yet, is there a delay/approval process before it shows up?
Yeah, the approval at http://www.apex-plugin.com takes a little while, please be patient.
Seems i released the blog posting too early ;-)
@Niels
there is a limitation on the number of requests see: http://code.google.com/apis/maps/faq.html#geocoder_limit
Dear Peter,
I hasve just downloaded the address validatin plugin for APEX 4 and installed it into the shared components of an application successfully. I can the plugin in the repository, but if I try to create a page of type plug-in APEX tells me that there are no plugins installed. What do I do wrong?
Thanks for your advice,
Lutz Hartmann
Hi Lutz,
i think you looked at the wrong place (region?).
This is an item type plugin. You can set a Page Item now to be this plugin.
Dear Peter,
the plugin has been installed correctly, in the new page I created a plugin ITEM type but when i run the page nothing appears (it’s running indefinitely…). Could you help me ? Thanks a lot.
Hi Giuago,
well, that can have an indefinite number of reasons.
Please run the Page in Debug Mode and also activate the Java-Console (e.g. Firebug Plugin for Firefox) and tell me what you find out.
Dear Peter,
it works perfectly in a Desktop application but it doesn’t work in the mobile application and I did the same activities for both the applications. Have I do something different for the Mobile one ?
Thanks a lot.
Giuseppe
Giuago,
are you running the mobile app in your desktop browser, or in a mobile browser?
any chance i can take a look at that?
Dear Peter,
I’m running the mobile app in my desktop browser…
Sorry, but i can not help you if you do not provide me any details.
Dear Peter,
I did a big and stupid mistake : instead of #PLUGIN_PREFIX# I wrote #IMAGE_PREFIX# in the Plugin Files, File Prefix session !
I apologize for disturb you.
Thanks a lot.
Giuseppe
hi peter,
I have installed this plugin successfully and am able to return map locations based on the string I enter. I have a question though, how do I return the data you display in your “Advanced Returns” section. (ie formatted address , coordinates etc).
Thanks
Thomas
Thomas,
look at the Plugin Settings. There you will find Attributes to specify Item Names where this Additional Information should get written into.
Hi Peter,
several years ago, I’ve implemented your plugin “Address validation and display map”. Everything runs fin till upgrading from Apex 4.2 to 5.1. My app has adress information in form: postalcode, City, street (e.g. 72213 Altensteig Rathausplatz 1).
From main page i open a popup page, to show the map for this adress. The popup page Shows no error, but the map isn’t displayed.
Do you hav any Information, that your plugin runs unsuccessful within APEX 5.1?
Thanks for any update.
Regards
Gerd
Hi Gerd,
Please check your browses javascript console. In there you’ll probably see some error messages. My guess is something about blocked mixed content.
The reason for that is the plugin’s code, which requests a google resource via http://
Please edit the plugin code and remove “http:” and leave the string starting with “//”