PageSourceSearch

http://ciel-f.org/demo_geo/polymaps/world.js

js ciel-f.org collected 2026-10-05 05:16:23 UTC 3,268 bytes, 113 lines download raw bytes

1function runPolymaps(){
2	var po = org.polymaps;
3	
4	// abrimos la variable como global quitano la definicion "var" ... para que pueda ser accesible al script position.js
5	map = po.map()
6	    .container(document.getElementById("map").appendChild(po.svg("svg")))
7	    .center({lat: 22, lon: 0})
8	    .zoomRange([2, 14])
9	    .zoom(2.6)
10	    .add(po.drag())
11	    .add(po.dblclick())
12	    .add(po.wheel());
13	    //.add(po.interact())
14	    
15	map.add(po.compass()
16	    .pan("none"));
17	    
18	/*
19	map.add(po.image()    
20		.url("/Users/alconpez/Desktop/mapnik_maps/tiles3/{Z}/{X}/{Y}.png"));
21	*/
22	
23	/*
24	map.add(po.image()    
25		.url("http://a.tile.openstreetmap.org/{Z}/{X}/{Y}.png"));
26	*/
27	
28	// CLOUDMADE NO OFRECE EL SERVICIO DESDE EL 1.5.2014
29	/*
30	map.add(po.image()
31	    .url(po.url("http://{S}tile.cloudmade.com"
32	    + "/22555b80be1d4814a8390d302f33c7af" // api cloudmade key
33	    + "/998/256/{Z}/{X}/{Y}.png") // 999: Midnight Commander (Cloudmade); 8: Red Alert (Cloudmade); 1: Original (Cloudmade); 998: Pale Dawn (Cloudmade)
34	    .hosts(["a.", "b.", "c.", ""])));
35	*/ 
36	  
37	// MAPQUEST
38	 /*
39	 map.add(po.image()
40	    .url(po.url("http://otile1.mqcdn.com/tiles/1.0.0/map/{Z}/{X}/{Y}.jpg")
41	    .hosts(["a.", "b.", "c.", ""])));
42	    */
43	// NOKIA
44	/*
45	   map.add(po.image()
46	    .url(po.url("http://maptile.maps.svc.ovi.com/maptiler/maptile/newest/normal.day/{Z}/{X}/{Y}/256/png8")
47	    .hosts(["a.", "b.", "c.", ""])));  
48	 */
49	    
50	// GOOGLE
51		 map.add(po.image()
52		    .url(po.url("http://mt0.google.com/vt/x={X}&y={Y}&z={Z}")
53		    .hosts(["a.", "b.", "c.", ""]))); 
54	       	
55	// marcadores
56	/*
57	map.add(po.geoJson()
58	    .url("data/location/francophone-world.json")
59	    .tile(false)
60	    .id("frworld-official")
61	    .zoom(4)
62	    .on("load", load));
63	    
64	map.add(po.geoJson()
65	    .url("data/location/francophone-world-second.json")
66	    .tile(false)
67	    .id("frworld-second")
68	    .zoom(4)
69	    .on("load", load));
70	*/
71	map.add(po.geoJson()
72	    //.url("data/location/location.json")
73	    .url("/demo_geo/data/location/ciel_f_v4.json")
74	    //.url("data/location/marcadores.json")
75	    .tile(false)
76	    .id("marcadores")
77	    .zoom(4)
78	    .on("load", loadCircle));
79	// fin marcadores
80	  
81	/*  
82	function loadData(e) {
83	  for (var i = 0; i < e.features.length; i++) {
84	    var feature = e.features[i],
85	        n = feature.data.properties.NAME;
86	    	n$(feature.element).attr("title", n);
87	  }
88	}
89	*/
90	
91	function loadCircle(e) {
92	  for (var i = 0; i < e.features.length; i++) {
93	    var feature = e.features[i],
94			n = feature.data;
95			n = feature.data.properties.VALUE;
96			n$(feature.element).attr("r", Math.sqrt(10*n));
97			n = feature.data.properties.NAME;
98			nn = feature.data.properties.VALUE;
99	    	n$(feature.element).attr("title", n);
100	    	
101	    	nnn = feature.data.properties.RECREF;
102	    	
103	    	n$(feature.element).attr("onclick", "showRecording('"+nnn+"');"); //entre los parentesis incluiremos el id del recording a llamar
104	    	n$(feature.element).attr("id", "c"+nnn);
105	    	n$(feature.element).attr("class", "circle");
106	    	
107	    	feature.element.appendChild(po.svg("title").appendChild(document.createTextNode(n+": "+nn)).parentNode);
108	  }
109	}
110	
111	//arrancamos el calculo de posicion (caja con informaciones de lat/long
112	//init_longlat();
113}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.