Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to show the full resolution image at clicking on thumnail
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
amritpal pathak  
View profile  
 More options Jan 10 2011, 8:23 am
From: amritpal pathak <amritpalpath...@gmail.com>
Date: Mon, 10 Jan 2011 18:53:25 +0530
Local: Mon, Jan 10 2011 8:23 am
Subject: How to show the full resolution image at clicking on thumnail

I am new to this mailing list and this is my first post to this list.
I am working on the Ruby on Rails application (OpenStreetView).I need a help
in the following issue.
There are 5 copies of the same images are placed in a folder i.e.
large(1024*768),medium(500*
375),small(240*180),thu mnail(75*75),square(100*50) in size.
The following code upload number of Geocoded images(square size) when the
page loads.I want when someone click on the any Geocoded image on the page
,it should show the large image(1024*768) of the same.And further click on
the large image it must show again the square size image of the same.
Following is the actual code.It is in .js file.Hope for reply from you very
soo

var epsg4326 = new OpenLayers.Projection("EPSG:4326");
var OSVMain = (function() {
var map, markers, map_move_timeout;
var photos = {};
function mapChange() {
if( map_move_timeout )
clearTimeout(map_move_timeout);
map_move_timeout = setTimeout(mapChangeTimeout, 500);
updateLinks();

}

function updateLinks() {
var center = OSV.getMapCenter(map);
var zoom = map.getZoom();
$('#permalink').attr('href',OSV.getURLBase()+'?lat
='+center.lat+'&lon='+center.lon+'&zoom='+zoom);
$('#kmllink').attr('href',getLocateLink('kml'));
}

function getLocateLink(format) {
var extent = OSV.getMapExtent(map);
var url = OSV.getURLBase()+'/api/photos/locate.'+format+'?bbox=';
url += [ extent.left, extent.bottom, extent.right, extent.top].join(',');
return url;
}

function mapChangeTimeout() {
map_move_timeout = null;
var url = getLocateLink('json');
$.get( url, null, photosLoaded, 'json' );
}

function photosLoaded(json) {
var new_photos = {};
var size = new OpenLayers.Size(50, 50);
var offset = new OpenLayers.Pixel(-25, -25);
for( var i = 0, l = json.length; i < l; ++i ) {
var p = new OSVPhoto(json[i]);
if( photos[p.data.id] ) {
new_photos[p.data.id] = photos[p.data.id];
photos[p.data.id] = null;
} else {

var position = new OpenLayers.LonLat(p.data.lon,p.data.lat);
var icon = new OpenLayers.Icon(p.url('square'), size, offset);
p.marker = new OpenLayers.Marker(position.clone().transform(epsg4 326,
map.getProjectionObject()), icon);
new_photos[p.data.id] = p;
markers.addMarker(p.marker);

}
}

for( var k in photos ) {
var p = photos[k];
if( p && p.marker )
markers.removeMarker(p.marker);
}

photos = new_photos;
}

function setup() {
var vectors;
var popup;

map = new OpenLayers.Map($('#map').get(0), {
controls: [
new OpenLayers.Control.ArgParser(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar()
],
units: "m",
maxResolution: 156543.0339,
numZoomLevels: 20,
displayProjection: new OpenLayers.Projection("EPSG:4326")

});

var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
displayOutsideMaxExtent: true,
wrapDateLine: true
});

map.addLayer(mapnik);

var osmarender = new OpenLayers.Layer.OSM.Osmarender("Osmarender", {
displayOutsideMaxExtent: true,
wrapDateLine: true

});

map.addLayer(osmarender);

var numZoomLevels = Math.max(mapnik.numZoomLevels,
osmarender.numZoomLevels);

var start = OSV.getStartLocation();
var numzoom = map.getNumZoomLevels();
if (start.zoom >= numzoom) start.zoom = numzoom - 1;
map.setCenter(start.pos.clone().transform(epsg4326 ,
map.getProjectionObject()), start.zoom);
OSV.setupMapEventHandlers(map);
map.events.register("moveend", map, mapChange);
map.events.register("zoomend", map, mapChange);
mapChange();
markers = new OpenLayers.Layer.Markers("Markers", {
displayInLayerSwitcher: false,
numZoomLevels: numZoomLevels,
maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
maxResolution: 156543,
units: "m",
projection: "EPSG:900913"

});

map.addLayer(markers);

}

return {
setup: setup,
1:1
};
})();

$(function(){
OSVMain.setup();

});

Regards
Amrit pal
http://amritpalpathakgne.wordpress.com/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Collins  
View profile  
 More options Jan 10 2011, 8:28 am
From: Ken Collins <k...@metaskills.net>
Date: Mon, 10 Jan 2011 08:28:24 -0500
Local: Mon, Jan 10 2011 8:28 am
Subject: Re: [Rails-core] How to show the full resolution image at clicking on thumnail

Amrit,

> I am new to this mailing list and this is my first post to this list.

The rails/ruby core lists are not the place for general help. This particular list is dedicated to development of rails itself. I did see you had sent your message to rails talk which is the correct place and I am sure you will get good advice there.

 - Cheers,
    Ken


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »