November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Inside your last if statement, if you get this far you know that this PageData object has the requied properties. Not sure how your MapPoint class looks, but I guess it has two properties for Longitude and Latitude that you then can set and add to your collection.
Hard to tell without knowing what you plan to use poiLists for and what MapPoint looks like.
Frederik
Hi Robin,
So if understand correctly you have managed to get the coordinates of the offices and you want to show them on your map?
One option could be to return the list of coordinates and insert them to your page type as inputs in the html:
<input type="hidden" value="longitude,latitude">
And on page load you collect the info from these inputs and outputs them with the google map javascript API.
Look at this example: (http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/examples/icon-simple.html)
function initialize() {
var myOptions = {
zoom: 4,
center: new google.maps.LatLng(-33, 151),
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var image = 'images/beachflag.png';
var myLatLng = new google.maps.LatLng(-33.890542, 151.274856);
//use document.getElementsByTagName and loop trough all inputs and create a new marker.
var beachMarker = new google.maps.Marker({
position: myLatLng,
map: map,
icon: image
});
}
More info on the Google map api can be found here: http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/tutorial.html
Edit:
Made a quick gist to show what i meant:
Hello!
I have a bunch of Office Cards that i'd like to display on a map interface (Google maps). These Office Cards has 2 properties each, Longitude and Latitude, and I've worked out the following before I completly blacked out. My code consists of a DummyPage where I run everything, a Google Map-webcontrol (with all the scripts set up properly) and so on. I also have a containerpage apart from my epitree-structure where I store the Contact Cards, and two help classes called PageHelper and Maphelper. What i'd like to do is to look at all the children of my container page for the Office Cards and grab the two properties Longitude and Latitude. Here's where im struggling, in Maphelper:
Any help or valuable links is greatly apprechiated. Thanks!