Showing posts with label Google Maps API. Show all posts
Showing posts with label Google Maps API. Show all posts

Jun 30, 2007

Skype API (Skype4COM) + Google MAPS API = ? [3]

As a part of my Google Maps and Skype API I wanted to add custom icons to represent different objects on the map (currently I made it for the bus stations).

The picture bellow is the result :



It was again easy - we simply create GIcon object. Then we assign the URL of the image to be used, size of the icon and point, where the info window will appear :


Code


icon = new GIcon();
icon.image = 'BusFine.gif';
icon.iconSize = new GSize(39, 60);
icon.iconAnchor = new GPoint(5, 34);
icon.infoWindowAnchor = new GPoint(5, 2);




Then we only need to add this object as a second parameter in the GMarker object constructor.



Code


// point is a GPoint object, representing the location the marker
should be
// displayed.
marker = new GMarker(point, icon);



Note : Some browsers may need some more settings in order to display the custom icon correctly, the example above is for IE.

Jun 18, 2007

Skype API (Skype4COM) + Google MAPS API = ? [2]

The last few days I played a bit more with this little thing and made it a bit more stable.  First of all there were some strange silver rectangles in the map (which I suspect is becouse I use IE) another struggle was to force the map not to resize (pretty strange, huh?). I solved both issues at once by adding overflow="hidden"  style attribute to the div, containing the map. It is quite strange.  I also added the stnadard map types controls (Map, Satellite and Hybrid), that wasn't hard but took a lot of search in the net, I had the feeling that I need to define my layer, I don't know why but in the end I understood I only need to call : map.addControl(new GMapTypeControl()); it simply cannot be more easier. After the lesson with
the map type control it was a line of code to add the large zoom control : map.addControl(new GLargeMapControl()); the guys from Google really rule the world :). They made it as easy as possible. After I got the map types and the zoom control I wanted some challenge. I decided to add a tabbed info window, only for the test the first tab I wanted was : "User Info" and I wanted the second to be "Date of birth" that was again as easy as possible ! Nice work, googlers !

Finally here is what I have so far :


I will try to add custom layers and lines these days only to test how it works and is it hard to implement.

Jun 9, 2007

Skype API (Skype4COM) + Google MAPS API = ?

I've played a bit last few days. I was interested in mixing the Skype4COM library (Official Skype API) with the Google Maps API (Google's Geocoding Service). It was quite tricky to make them both work properly, but finally I got some "results". Screenshots of the results will be published in this post the next few days, since I have some difficulties using the blogger upload utility (probably it is becouse my ISP, not blogger itself).









And this is what I have done with Skype (Skype4COM) and Google Maps Api. I am thinking on how to incorporate this program into skype (probably as plugin or something) so it can be easier to use.

>