Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JackT06

macrumors 6502
Original poster
Jul 24, 2009
293
0
Hello,

I am looking at puttting a map on my website with a list of DofE Centres. What i need is a map, which people can see a DofE centre click on it, give some some more details.
Something like google maps, with the personalised maps.

I have tried google, but i ahd two problems with it, and they were that

1) The map is for the whole of the world. I only want it to display Hampshire.
2) The google reviews.

An example of what i want is Here.

Thanks,
Jack
 
With Google maps you can set the centre of the map and its zoom level programmatically. You can also ask google maps to set the zoom level so that it is optimised for the set of points on the map.

Here's some rough code, assume that there's an array of points to add to the map - pts:
Code:
// Create a "group" for the points we will be adding
var bounds=new GLatLngBounds();
for(i = 0; i < pts.length; i++)
{
  bounds.extend(new GLatLng(pts[i].lat, pts[i].lon));
}
// Get Google to figure out how much to zoom the map
map.setZoom(map.getBoundsZoomLevel(bounds));
// And tell it where to centre it.
map.setCenter(new GLatLng(area.lat, area.lon));

I'm not sure what you mean by "reviews", do you mean "views"? I.e. road, satellite, hybrid? If you want to add overlays of local authority areas then you will have to create these yourself - check the google maps documentation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.