Geolocation API in Firefox 3.5

With the relatively new 3.5+ release  comes a new Geolocation API that enables geographical positioning of the browser client. Positioning is done through an array of means:

“Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs”

This functionality was earlier available through 3rd part solutions such as Google Gears, but now it is natively supported in Firefox.

The key function is: navigator.geolocation.getCurrentPosition()
If you have Firefox 3.5+ you may test the Geolocation API here (please let me know if the result is correct).

Continue reading

Popularity: 5% [?]

Leave a comment

Google maps – highlight sidebar text on marker mouseover

Sometimes when integrating a Google map on a site it is useful to give feedback to the user when hovering the mouse over a map marker. While not very difficult to achieve, it may not be completely straight forward to beginners, so I just wanted to post my solution here.

The trick is to add a listener when creating the markers, and then use getElementID to select the corresponding item in the document, identified by a uniqe ID.

(Java script)
var marker = new GMarker(point, customIcons[\"standard\"]);
GEvent.addListener(marker, \"mouseover\", function() {
marker.setImage(\"../images/marker_h.png\");
var listItem = document.getElementById(\"item-\" + j);
listItem.style.backgroundColor = \"#FFFA5E\";
});
GEvent.addListener(marker, \"mouseout\", function() {
marker.setImage(\"../images/marker.png\");
var listItem = document.getElementById(\"item-\" + j);
listItem.style.backgroundColor = \"#FFFFFF\";
});

Continue reading

Popularity: 7% [?]

1 comment

Smart CSS trick to add icon to all outgoing links

Use this piece of CSS to add an icon to all links that is not to mydomain

a:not([href*="mydomain"]) {

 padding-right: 10px;

 background: transparent url("images/aoutside.gif") center right no-repeat;

 Continue reading 

Popularity: 5% [?]

Leave a comment

Component could not be upgraded – error with Media Player 11 and Vista

When trying to view some digital rights managed content I was instructed to upgrade Media Player, but the upgrade halted and I got the “Component could not be upgraded” message. No matter what I tried I could not get around this.

After some hours of searching on Google however, I came across this solution.

1. Click the Start button in the lower left corner.

Continue reading

Popularity: 5% [?]

2 comments

Simple Google Maps plugin for wordpress

What is it?
This is a demo post for a little plugin I wrote that uses custom fields in WordPress together with Google’s HTTP geo coding API and Google Maps to produce a map with a marker in the post. The current version (0.5) of the plugin takes the following custom keys and use them to geocode the location (Zip, City, Address, Country) and also display them in the info window popup in the map. Keys marked with a * are required for the plugin to output the map.

  • Zip
  • City*
  • Address
  • Country*
  • Phone
  • Misc

Installation and useage
Continue reading

Popularity: 10% [?]

11 comments