• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Small parts of a large image?

Participant ,
Feb 01, 2009 Feb 01, 2009

Copy link to clipboard

Copied

Hello,

This may be more of an HTML solution than a CF solution; I'm not entirely sure how to go about it.

I have a large map (of France, in this particular case, but it could be of anything) that is divided by county. I'd like to have it so, when you click on a county, it shows a sort of zoomed-in portion of that image. There are not so many counties that simply making separate images for each one is impossible; that's my current plan.

But would it be possible to use CF wizardry, assuming I knew the X and Y coordinates of the location on the large picture I wanted to view, to somehow display just a slice of the original picture, without having to carve it up into 40 separate image files? How would you suggest that I approach this problem?

Thanks very much!
Sam
TOPICS
Advanced techniques

Views

389

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 01, 2009 Feb 01, 2009
ok, then you probably can display the county image on the second page as
a background image in a div with dimensions set to county's rectangle.
you will need to position the background - thus you need to know the
coords of county;s rectangle.

alternatively, instead of showing the county as a background image, you
can display it as an absolutely positioned image in a fixed size div
with overflow="hidden"

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate
LEGEND ,
Feb 01, 2009 Feb 01, 2009

Copy link to clipboard

Copied

this is purely client-side problem the way you describe it.
so the solution will be client-side, too (javascript, image maps, etc).
CF is server-side technology, so it won't play any part in the solution.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 01, 2009 Feb 01, 2009

Copy link to clipboard

Copied

it's not necessarily a client side problem. Each individual page wants only a specific part of the master image - I don't actually need zoom functionality or anything like that. I just want a way to take image A on page a, and have a link on page A that goes to page B, which looks at a small section of image A.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 01, 2009 Feb 01, 2009

Copy link to clipboard

Copied

LATEST
ok, then you probably can display the county image on the second page as
a background image in a div with dimensions set to county's rectangle.
you will need to position the background - thus you need to know the
coords of county;s rectangle.

alternatively, instead of showing the county as a background image, you
can display it as an absolutely positioned image in a fixed size div
with overflow="hidden"

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation