Blog Bug's

bugging blogs

…on Maps API (Google 1.x, Google 2.x, & OSM) – Static with Paths

Google 1.x

	<img src="http://maps.google.com/staticmap?center=14.648552,121.068553&zoom=17&size=400x400&sensor=false&path=rgba:0xff0000ff,weight:5|14.647185,121.068959|14.648783,121.069002|14.648638,121.068637&key=ABQIAAAA8Hm0UjfAUlzqtm8C4hrYcRRHdNuSbQjBWSHvxpsS-elLV0ZwthR9fApc1xrVNPI-YmmRt62mP-Ifag" border="0" alt="Department Computer Science UP Diliman" />

Department Computer Science UP Diliman

Google 2.x

	<img border="0" src="http://maps.google.com/maps/api/staticmap?center=14.648552,121.068553&zoom=17&size=400x400&sensor=false&path=color:0xff0000ff|weight:5|14.647185,121.068959|14.648783,121.069002|14.648638,121.068637" alt="Department Computer Science UP Diliman" />

Department Computer Science UP Diliman

OSM

	<img class="sampleMap" src="http://dev.openstreetmap.org/~pafciu17/?module=map&center=121.068553,14.648552&zoom=17&type=mapnik&width=400&height=400&paths=121.068959,14.647185,121.069002,14.648783,121.068637,14.648638,thickness:5,transparency:0,color:255:0:0" alt="Department Computer Science UP Diliman" />

Department Computer Science UP Diliman

posted by ninoy in CS 297 and have No Comments

…on Maps API (Google 1.x, Google 2.x, & OSM) – Javascript with Markers

Google 2.x

	<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAA8Hm0UjfAUlzqtm8C4hrYcRRHdNuSbQjBWSHvxpsS-elLV0ZwthR9fApc1xrVNPI-YmmRt62mP-Ifag">
	</script>
	<script type="text/javascript">
		google.load("maps", "2.x");
		function initialize() {
			var map2a = new google.maps.Map2(document.getElementById("map2a"));
			map2a.setCenter(new google.maps.LatLng(14.648552,121.068553), 17);
			map2a.addOverlay(new GMarker(new GLatLng(14.648552,121.068553)));
		}
		google.setOnLoadCallback(initialize);
	</script>
	<div id="map2a" style="height: 400px; width: 400px;"></div>


OSM

	<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
	<script>
		var init = function() {
			var map2b = new OpenLayers.Map("map2b");
			var mapnik = new OpenLayers.Layer.OSM();
			map2b.addLayer(mapnik);
			var markers = new OpenLayers.Layer.Markers( "Markers" );
			map2b.addLayer(markers);
			var lonLat = new OpenLayers.LonLat(121.068553,14.648552).transform(
				new OpenLayers.Projection("EPSG:4326"),
				new OpenLayers.Projection("EPSG:900913")
			);
			markers.addMarker(new OpenLayers.Marker(lonLat));
			map2b.setCenter(lonLat, 17);
		}
		addOnLoadEvent(init);
    </script>
	<div id="map2b" style="height: 400px; width: 400px"></div>


refresh if no map rendered

posted by ninoy in CS 297 and have No Comments

…on Maps API (Google 1.x, Google 2.x, & OSM) – Static with Markers

Google 1.x

	<img src="http://maps.google.com/staticmap?center=14.648552,121.068553&zoom=17&size=400x400&sensor=false&markers=14.648552,121.068553,reda&key=ABQIAAAA8Hm0UjfAUlzqtm8C4hrYcRRHdNuSbQjBWSHvxpsS-elLV0ZwthR9fApc1xrVNPI-YmmRt62mP-Ifag" border="0" alt="Department Computer Science UP Diliman" />

Department Computer Science UP Diliman

Google 2.x

	<img border="0" src="http://maps.google.com/maps/api/staticmap?center=14.648552,121.068553&zoom=17&size=400x400&sensor=false&markers=color:red|label:A|14.648552,121.068553" alt="Department Computer Science UP Diliman">

Department Computer Science UP Diliman

OSM

	<img class="sampleMap" src="http://dev.openstreetmap.org/~pafciu17/?module=map&center=121.068553,14.648552&zoom=17&type=mapnik&width=400&height=400&points=121.068553,14.648552,pointImagePattern:redA" alt="Department Computer Science UP Diliman">

Department Computer Science UP Diliman

posted by ninoy in CS 297 and have No Comments

…on Maps API (Google 1.x, Google 2.x, & OSM) – Javascript

Google 2.x

	<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAA8Hm0UjfAUlzqtm8C4hrYcRRHdNuSbQjBWSHvxpsS-elLV0ZwthR9fApc1xrVNPI-YmmRt62mP-Ifag">
	</script>
	<script type="text/javascript">
		google.load("maps", "2.x");
		function initialize() {
			var map1a = new google.maps.Map2(document.getElementById("map1a"));
			map1a.setCenter(new google.maps.LatLng(14.648552,121.068553), 17);
		}
		google.setOnLoadCallback(initialize);
	</script>
	<div id="map1a" style="height: 400px; width: 400px;"></div>


OSM

	<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
	<script>
		var init = function() {
			var map1b = new OpenLayers.Map("map1b");
			var mapnik = new OpenLayers.Layer.OSM();
			map1b.addLayer(mapnik);
			var lonLat = new OpenLayers.LonLat(121.068553,14.648552).transform(
				new OpenLayers.Projection("EPSG:4326"),
				new OpenLayers.Projection("EPSG:900913")
			);
			map1b.setCenter(lonLat, 17);
		}
		addOnLoadEvent(init);
    </script>
	<div id="map1b" style="height: 400px; width: 400px"></div>


refresh if no map rendered

posted by ninoy in CS 297 and have No Comments

…on Maps API (Google 1.x, Google 2.x, & OSM) – Static

Google 1.x

	<img src="http://maps.google.com/staticmap?center=14.648552,121.068553&zoom=17&size=400x400&sensor=false&key=ABQIAAAA8Hm0UjfAUlzqtm8C4hrYcRRHdNuSbQjBWSHvxpsS-elLV0ZwthR9fApc1xrVNPI-YmmRt62mP-Ifag" border="0" alt="Department Computer Science UP Diliman" />

Department Computer Science UP Diliman

Google 2.x

	<img border="0" src="http://maps.google.com/maps/api/staticmap?center=14.648552,121.068553&zoom=17&size=400x400&sensor=false" alt="Department Computer Science UP Diliman">

Department Computer Science UP Diliman

OSM

	<img class="sampleMap" src="http://dev.openstreetmap.org/~pafciu17/?module=map&center=121.068553,14.648552&zoom=17&type=mapnik&width=400&height=400" alt="Department Computer Science UP Diliman">

Department Computer Science UP Diliman

posted by ninoy in CS 297 and have No Comments

…Including Ubuntu Sensors

sudo apt-get install lm-sensors sensors-applet

then

sudo sensors-detect

posted by ninoy in Tips and have No Comments

…Working with Django (PyDev) over LAMP and Eclipse

Apache and Mysql
i) sudo apt-get install libapache2-mod-python python-mysqldb

Eclipse and PyDev
i) sudo apt-get install python
ii) sudo eclipse
iii) Help > Install New Software
iv) click Add, input local: pydev location: pydev.org/updates, click Ok
v) Select PyDev from the list then click Next for installation
vi) When install finishes restart Eclipse

Django
i) download latest tarball from www.djangoproject.com
ii) extract and install : sudo python setup.py install
iii) on eclipse : System > Preferences > Pydev > Interpreter – Python
iv) on System PYTHONPATH, click New Folder, input location: /user/local/lib/python2.6/dist-packages/django/bin/, and click Ok then click Apply

posted by ninoy in Django and have No Comments

on Knowing Ubuntu Version

to know your running ubuntu version use :
lsb-release -a
or
cat /etc/issue

posted by ninoy in Tips and have No Comments

on Printing pdf Slides…

Just a tip on controlling more the number of pdf slides (pages) on a sheet. Indirectly print first the pdf pages using a pdf writer (adobe pdf or cute pdf), i.e. print the pdf’s in a pdf, before finally printing.

posted by ninoy in Life's like that and have No Comments

on WP Comments…

Having comments from pausleal@simps.com? Well as suspected, it is an automated comment. As a proof, here’s an sql dump from danelo. Check the wp_comments table.

posted by ninoy in Life's like that and have No Comments