Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8880327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:08:48+00:00 2026-06-14T20:08:48+00:00

I have been dealing with this problem for almost three days now so I

  • 0

I have been dealing with this problem for almost three days now so I guess my failed researches and trial and error of the concept I formulated are enough. Here’s the scenario:

I use open layers map. I generate markers. On hover with these markers i need to show a label “View Details” using the popup framed dialog. Once “View Details” is clicked, I need to load jpg file which is a top view screen shot of that particular place corresponding the marker in my map. I can do it successfully, I click “View Details” and I can show the image. But the big problem is, the four edges of my popup framed cloud are scattered around and its content is transparent with the image floating in the middle.

I attached an inline “onclick attribute” for the view details label:

fromImage = '<img src="'+data['map_locations'][key]['image_url']+'" class="ImageFrom"></img><label type="button" class="location_image_container" onclick="show_location_details()">VIEW DETAILS</label>';

and this is the function it calls everytime view details is clicked

function show_location_details(){
    jQuery('#cloud_dialog_details_link').hide();
    jQuery('.olFramedCloudPopupContent').width(500);
    jQuery('.olFramedCloudPopupContent').height(400);
    jQuery('.olPopup').height(400);
    jQuery('.olPopup').width(500);
    jQuery(".ImageFrom").show();
}

Any idea how can I make my popup framed cloud behave the way i want it to behave?

Thank you guys for any inputs.

[EDIT]
hi. To make things clear, I declared a global ‘AutoSizeFramedCloud’ in my script

AutoSizeFramedCloud = OpenLayers.Class(OpenLayers.Popup.FramedCloud,{'autosize':true});

And inside a function, I set its initial constructor:

function addMarkers(lonlat, marker_name, description, id, label, subgroup, category){
        var ll,popupClass,popupContentHTML,marker,popupContentDiv;
        ll = lonlat;
        popupClass = AutoSizeFramedCloud;
        popupContentHTML = description+label;
        marker = marker_name;
        popupContentDiv = id;
        popupGroupDiv = subgroup;
}

And by the time I clicked the ‘View Details’ label which is inside my popup:

<label type="button" class="location_image_container" onclick="show_location_details()">VIEW DETAILS</label>

I am calling function show_location_details()

function show_location_details(){
        this.popup.setSize(new OpenLayers.Size(500, 400));
        //alert(jQuery('popup.contentDiv').val());
        jQuery('#cloud_dialog_details_link').hide();
        jQuery('.olPopup').width(600);
        jQuery('.olFramedCloudPopupContent').width(480);
        jQuery('.olPopup').height(500);
        jQuery('.olFramedCloudPopupContent').height(380);
        jQuery(".ImageFrom").show();
    }

However, it gives me the error:

Uncaught TypeError: Cannot call method 'setSize' of undefined 

[EDIT]

Here’s how i create the features of my popup

function addMarker(ll, popupClass, popupContentHTML, closeBox, overflow, marker_name, popupContentDiv, popupGroupDiv, category){
        var feature = new OpenLayers.Feature(marker_name, ll);
        feature.closeBox = closeBox;
        feature.popupClass = popupClass;
        feature.data.popupContentHTML = popupContentHTML;
        //feature.data.overflow = (overflow) ? "auto":"hidden";
        feature.data.icon = new OpenLayers.Icon("./img/icon/blank.png", size);
        feature.data.contentDiv = popupContentDiv;
        feature.data.groupDiv = popupGroupDiv;

...
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:08:49+00:00Added an answer on June 14, 2026 at 8:08 pm

    Popup is made from lot of different DIV’s, don’t try to change their size directly, use appropriate methods of popup instead: setSize(contentSize), which takes size as parameter; or updateSize(), which auto-sizes popup to fit it’s content: http://dev.openlayers.org/docs/files/OpenLayers/Popup-js.html#OpenLayers.Popup.setSize

    var myPopup = new OpenLayers.Popup.FramedCloud({
    ...    
    
    
    myPopup.setSize(new OpenLayers.Size(500, 400));
    // Or...
    // myPopup.updateSize();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been dealing many days with a problem without any success. In my
I have been dealing with a problem with 3 programs from this book: C
I have been dealing with a problem for a while. How can I set
I've been dealing with a frustrating problem recently. I have a lot of reflection
I've been dealing with this problem for quite some time. What I am trying
I have been dealing with a problem for some time and would really appreciate
I've been dealing with this issue for awhile now ( https://stackoverflow.com/questions/12982012/unit-testing-core-data-to-many-relationship ), but I've
I have a problem I've been dealing with lately. My application asks its users
I have been dealing with strange problem. I am using KryptonForm in a project.
I've been dealing with this before but it seems like the problem came back.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.