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 7728025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:36:44+00:00 2026-06-01T05:36:44+00:00

I want to display multiple markers, and when i click on each marker it

  • 0

I want to display multiple markers, and when i click on each marker it has to open framecloud popup with customized data.

I couldn’t find any tutorial regarding open framecloud popup when on click of marker.

please help me regarding this.

  • 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-01T05:36:45+00:00Added an answer on June 1, 2026 at 5:36 am

    This link is helpful. From it I created this code as a demonstration:

    <html>
    <head>
        <script src="http://openlayers.org/dev/OpenLayers.js"></script>
        <script type="text/javascript">
            var map, mappingLayer, vectorLayer, selectMarkerControl, selectedFeature;
    
            function onFeatureSelect(feature) {
                selectedFeature = feature;
                popup = new OpenLayers.Popup.FramedCloud("tempId", feature.geometry.getBounds().getCenterLonLat(),
                                         null,
                                         selectedFeature.attributes.salutation + " from Lat:" + selectedFeature.attributes.Lat + " Lon:" + selectedFeature.attributes.Lon,
                                         null, true);
                feature.popup = popup;
                map.addPopup(popup);
            }
    
            function onFeatureUnselect(feature) {
                map.removePopup(feature.popup);
                feature.popup.destroy();
                feature.popup = null;
            }   
    
            function init(){
                map = new OpenLayers.Map( 'map');
                mappingLayer = new OpenLayers.Layer.OSM("Simple OSM Map");
    
                map.addLayer(mappingLayer);
                vectorLayer = new OpenLayers.Layer.Vector("Vector Layer", {projection: "EPSG:4326"}); 
                selectMarkerControl = new OpenLayers.Control.SelectFeature(vectorLayer, {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});
                map.addControl(selectMarkerControl);
    
                selectMarkerControl.activate();
                map.addLayer(vectorLayer);
                map.setCenter(
                    new OpenLayers.LonLat(0, 0).transform(
                        new OpenLayers.Projection("EPSG:4326"),
                        map.getProjectionObject())
    
                    , 1
                );    
            }
    
            function placeRandomMarker(){
                var randomLat = Math.floor((Math.random()*180)-90);
                var randomLon = Math.floor((Math.random()*180)-90);
                var randomLonLat = new OpenLayers.Geometry.Point( randomLon, randomLat);
                randomLonLat.transform("EPSG:4326", map.getProjectionObject());
                var randomFeature = new OpenLayers.Feature.Vector(randomLonLat,
                                        { salutation: "hello world", Lon : randomLon, Lat : randomLat});
                vectorLayer.addFeatures(randomFeature);
                var popup = new OpenLayers.Popup.FramedCloud("tempId", new OpenLayers.LonLat( randomLon, randomLat).transform("EPSG:4326", map.getProjectionObject()),
                           null,
                           randomFeature.attributes.salutation + " from Lat:" + randomFeature.attributes.Lat + " Lon:" + randomFeature.attributes.Lon,
                           null, true);
                randomFeature.popup = popup;
                map.addPopup(popup); 
            }
    
    
        </script>
    
    
    </head>
    <body onload="init()">
    
    <div id="map" style="height:600px; width: 1000px;"></div>
    <button onclick="placeRandomMarker()">Place Marker</button>
    </body>
    </html>
    

    It has a vector layer for placing points (which you could style with a style map to be custom shapes or using graphic markers. The vector layer has an associated SelectFeature Control which calls code to add FramedCloud popups to the map.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple SharePoint lists and want to display data from them on to
I want to display multiple objects in the north part of a java window.
I want to know which component is best to display multiple line of text's(
I want to create a UI that uses a tab control to display multiple
I want to display a UITableView with Multiple Columns. The first column will have
I want to have a element that displays in the multiple selection display style
I want display data from database in Listbox...Here is my code, It is not
I have multiple div's I want to display in a horizontal row. Normally, the
I'm using CodeIgniter and I want to display a list of cities in multiple
I have a number of database tables below. I want to display each user

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.