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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:51:19+00:00 2026-06-08T00:51:19+00:00

I am trying to use ImageMapster plugin for my application. It works fine when

  • 0

I am trying to use ImageMapster plugin for my application. It works fine when using static image map in html. But my problem is that, when am rendering image and area tag through jquery, it is not working. I am using web api for getting attributes for image.

Here is my script :

$(document).ready(function () {

       var iiim = "";
       var url = 'http://mobileappapi.azurewebsites.net/api/HomeApiImage';
       $.get(url, function (data) {
           iiim = data["BgImg"];
           var url = 'http://mobileappapi.azurewebsites.net/api/HomeApi';
           $.get(url, function (data) {


               $('#map_demo').prepend('<img  src="' + iiim + '" usemap="#usa" id="myimage" style="margin-top:43px;"/>')
               for (var i = 0; i < data.length; i++) {

                   $('#usa_image_map').append('<area href="#" coords="' + data[i].Node_Location + '" state="n' + i + '" shape="rect" title="' + data[i].Node_Title + '" />')


               }
           }, "jsonp");

       }, "jsonp");


       $('#myimage').mapster({

           fillColor: 'ff0000',
           fillOpacity: 0.3
       });
   });

here is my html code,

 <body>
<div id="map_demo"> 
</div>
    <map id="usa_image_map" name="usa">
    </map>


 </body>

Please help me,
Thanks.

  • 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-08T00:51:20+00:00Added an answer on June 8, 2026 at 12:51 am

    $.get() is an AJAX function; as such, it hasn’t finished generating the new images before your .mapster method runs.

    You have to put your .mapster call in your .get callback, after the image is created, to make sure it runs at the correct time.

    Try this:

    $(document).ready(function () {
    
        var iiim = "";
        var url = 'http://mobileappapi.azurewebsites.net/api/HomeApiImage';
        $.get(url, function (data) {
            iiim = data["BgImg"];
            var url = 'http://mobileappapi.azurewebsites.net/api/HomeApi';
            $.get(url, function (data) {
                $('#map_demo').prepend('<img  src="' + iiim + '" usemap="#usa" id="myimage" style="margin-top:43px;"/>')
                for (var i = 0; i < data.length; i++) {
                    $('#usa_image_map').append('<area href="#" coords="' + data[i].Node_Location + '" state="n' + i + '" shape="rect" title="' + data[i].Node_Title + '" />')
                }
                $('#myimage').mapster({
                    fillColor: 'ff0000',
                    fillOpacity: 0.3
                });
            }, "jsonp");
        }, "jsonp");
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know how to create a cvCreateStructuringElementEx using a image? I'm trying use opencv.cv.cvCreateStructuringElementEx()
I was trying use svn to find a checkin using svn log, but it
I am trying use Thread but i have some problem (I am beginner at
Yesterday I noticed problem with my application. Everything was fine, but now something is
I am trying use the jQuery table sorter plugin for a table that is
I am trying use gem tire to search in my application. I have tables
I am need paint my image. I'm trying use JQuery in here this link:
I'm trying use Lift and CalendarMonthView widget to build a appointment system. CalendarMonthView works
I have been trying use the edit_post_link() function to contain an image. All of
Trying to use this sql statement. The first 2 parts work fine, I am

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.