PageSourceSearch

https://www.communes.com/js/openmaps.js

js communes.com collected 2026-10-02 06:44:36 UTC 2,144 bytes, 59 lines download raw bytes

1function afficheMapBig(data,idMap,zoom) {
2    try{
3        var jsonData = jQuery.parseJSON(data);
4        var lat = jsonData.lat;
5        var lng = jsonData.lng;
6        var title = jsonData.ville;
7        map = new OpenLayers.Map(idMap);
8        var Navigation = new OpenLayers.Control.Navigation({
9            'zoomWheelEnabled': false,
10        });
11        map.addControl(Navigation);
12
13        var NavigationControls = map.getControlsByClass('OpenLayers.Control.Navigation')
14        , i;
15
16        for ( i = 0; i < NavigationControls.length; i++ ) {
17            NavigationControls[i].disableZoomWheel();
18        }    
19        var mapnik         = new OpenLayers.Layer.OSM();
20        var fromProjection = new OpenLayers.Projection("EPSG:4326");   // Transform from WGS 1984
21        var toProjection   = new OpenLayers.Projection("EPSG:900913"); // to Spherical Mercator Projection
22        var position       = new OpenLayers.LonLat(lng, lat).transform( fromProjection, toProjection);
23
24        map.addLayer(mapnik);
25
26        var markers = new OpenLayers.Layer.Markers( "Markers" );
27        map.addLayer(markers);
28        //Custom icon
29        var size = new OpenLayers.Size(27,43);
30        var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
31        var icon = new OpenLayers.Icon('https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png', size, offset);    
32        //Marker
33        var marker = new OpenLayers.Marker(position, icon);
34        //popup
35        marker.events.register("click", marker, function(e){
36            popup = new OpenLayers.Popup.FramedCloud("chicken",
37                    marker.lonlat,
38                    new OpenLayers.Size(200, 200),
39                    title,
40                    null, true);
41
42            map.addPopup(popup);
43        }); 
44        markers.addMarker(marker);
45        map.setCenter(position, zoom );
46    }catch(e){
47        console.log(e);
48    }
49}
50function afficheVilleMapBig(data,idMap) {
51    afficheMapBig(data,idMap,13);
52}
53function afficheDepartementMapBig(data,idMap){
54    afficheMapBig(data,idMap,9);
55}
56function afficheRegionMapBig(data,idMap){
57    afficheMapBig(data,idMap,7);
58}
59 

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.