Hi there, have an estate agent site, results are stored in a MS SQL database and they input the postcode for each property with no spaces.
Users can search for their properties via price range (min and max) and it pulls the results in a repeating list.
Would like to offer the option here of showing results on a Google Map and have been reading up on the google map API but having never used it before it is losing me a little.
Is this achievable just from the postcode alone and can it have pop ups showing other data pulled in from the DB (photo, price, address etc.)
Like this here, presume they are using the Google API? mappr.co.uk
Anyone done something similar?
Thanks for any advice.
Page 1 of 1
Google Map API on Estate Agent website
#2
Posted 25 January 2012 - 07:44 AM
I would recommend not using post codes. They can be very inaccurate if the property is in a rural location. Commercial property in an industrial estate which has a single post code may also lead to accuracy problems.
I used exact co-ordinates for my last goole api project.
It literally took me 2 days to sort out all the commas, apostrophes and quotes to get the code right.
The actual logging of the exact co-ordinates took more than two days....
http://www.cookstown...sp?countryid=17
I used exact co-ordinates for my last goole api project.
It literally took me 2 days to sort out all the commas, apostrophes and quotes to get the code right.
The actual logging of the exact co-ordinates took more than two days....
http://www.cookstown...sp?countryid=17
#3
Posted 25 January 2012 - 11:29 AM
webchap, on 24 January 2012 - 09:48 PM, said:
Hi there, have an estate agent site, results are stored in a MS SQL database and they input the postcode for each property with no spaces.
Users can search for their properties via price range (min and max) and it pulls the results in a repeating list.
Would like to offer the option here of showing results on a Google Map and have been reading up on the google map API but having never used it before it is losing me a little.
Is this achievable just from the postcode alone and can it have pop ups showing other data pulled in from the DB (photo, price, address etc.)
Like this here, presume they are using the Google API? mappr.co.uk
Anyone done something similar?
Thanks for any advice.
Users can search for their properties via price range (min and max) and it pulls the results in a repeating list.
Would like to offer the option here of showing results on a Google Map and have been reading up on the google map API but having never used it before it is losing me a little.
Is this achievable just from the postcode alone and can it have pop ups showing other data pulled in from the DB (photo, price, address etc.)
Like this here, presume they are using the Google API? mappr.co.uk
Anyone done something similar?
Thanks for any advice.
I have built a couple of estate agents sites using the Google API. The property listings are entered by the agent and in their website control panel they have to choose a location from a dynamically generated list. I had to populate the DB with the co-ords for a great many locations and occasionally I am asked to update this.
Using postcodes didn't work and the agents did not want pinpoint accuracy to prevent other agents knocking on doors and poaching their clients.
It takes time to do this but once done you can add it to your gooody store to use on other sites should the need arise.
Implementing the API is quite simple.
#4
Posted 25 January 2012 - 01:11 PM
Thanks for the replies, yes I would use it a fair few times.
So in your database you have a column for co-ordinates and you created a table with all of these co-ordinates in to start with?
Client then selects a location from that table (via a dropdown?) for each property?
Would ideally need to be street level so must be thousands of co-ordinates to ad in to start with though. One agent I do has 7 offices in the county.
It's the joining that up with the API that I think I am getting lost on.
So in your database you have a column for co-ordinates and you created a table with all of these co-ordinates in to start with?
Client then selects a location from that table (via a dropdown?) for each property?
Would ideally need to be street level so must be thousands of co-ordinates to ad in to start with though. One agent I do has 7 offices in the county.
It's the joining that up with the API that I think I am getting lost on.
#5
Posted 25 January 2012 - 01:23 PM
webchap, on 25 January 2012 - 01:11 PM, said:
Thanks for the replies, yes I would use it a fair few times.
So in your database you have a column for co-ordinates and you created a table with all of these co-ordinates in to start with?
Client then selects a location from that table (via a dropdown?) for each property?
Would ideally need to be street level so must be thousands of co-ordinates to ad in to start with though. One agent I do has 7 offices in the county.
It's the joining that up with the API that I think I am getting lost on.
So in your database you have a column for co-ordinates and you created a table with all of these co-ordinates in to start with?
Client then selects a location from that table (via a dropdown?) for each property?
Would ideally need to be street level so must be thousands of co-ordinates to ad in to start with though. One agent I do has 7 offices in the county.
It's the joining that up with the API that I think I am getting lost on.
The DB can be updated from the clients control panel so they can add the co-ords if they wish. This adds data to a field "geo". I then insert this data dynamically into the API something like this on each property page:
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(<?php echo mysql_real_escape_string('$co-ord');?>);
var myOptions = {
zoom: 13,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
var marker = new google.maps.Marker({
position: latlng,
map: map,
title:"<?php echo mysql_real_escape_string('$location');?>"
});
}
</script>Works for me
Share this topic:
Page 1 of 1
Help
















