Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Google Map API on Estate Agent website

Featured Replies

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.

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.cookstownwardead.co.uk/nationlist.asp?countryid=17

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.

 

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.

  • Author

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.

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.

 

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 :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.