Create a Visualforce page that displays sales data on a Google map. Initially display the map for the entire United States. The user will then be able to enter a Country (required), State/Province and City to narrow the addresses that are displayed on the map.
Users will be able to filter the results displayed by:
1. Project size: a slider from 0 - 250+
2. Year: a beginning and end year
3. Type: any combination of the three types
There could be multiple sales at the same physical address but the search should return a resultset of distinct addresses that are plotted on the map. When the user clicks on a pin it will populate the right pane with all of the sales for that location. Selecting an individual sales from the right pane will open that record in a new window displaying.
For a list of countries to display in the picklist, install the AddressTools
package from the AppExchange.
For demo purposes, only show sample data for US, Germany and Japan. If you need to geocode records in Salesforce, you can either do so manually or use the results of our SimpleGeo Geolocation Toolkit
The query for sales data is dependent upon the country being searched. The US uses a ���Sales Order��� custom object while Germany and Japan use the Opportunity object. We want to make the search dynamic so if more countries are added it will be easy to configure where the data comes from. Add a ���Search_Opportunities__c��� (boolean) field to the country object in from the AddressTools package. When the user selects a search country, check the value of ���Search_Opportunities__c��� to determine what object to search. You might want to consider implementing some sort of common wrapper object to populate that holds Sales Order or Opportunity data. Here are the fields that you will need:
Size field = Size__c ��: Number(18,2)
Year ��= CloseDate ��: standard field
Type = Type ( picklist ) ��: standard field
Address : BillingAddress fields on related Account (standard fields)
Sales Order (new custom object)
Size = Size__c ��: Number(18,2)
Year ��= Delivery_Date__c ��: Date type
Type = Type__c �� : Picklist field
Country__c : Text field ( size 255 )��
State__c : Text field ( size 255 )��
City__c : Text field ��( size 255 )��
ZipCode__c : Text field ��( size 15 )
Street__c : Text field ( size 255 )��
Must have adequate test coverage (90%+).