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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:48:09+00:00 2026-05-29T11:48:09+00:00

I am having an issue with a dynamic Ovi / Nokia map whereby I

  • 0

I am having an issue with a dynamic Ovi / Nokia map whereby I want to reload the markers every 30 seconds – markers are read from XML and have dynamic content. Everything works fine except for the bubble. It shows on load only and then on first refresh marker is no longer clickable (changes to zoom when clicked on it). I want the updated marker to show the latest html content in the bubble too:

<script> 
var markerCoords;
var mapContainer;
var container;
var myMap;
var bubbles=new Array();

// When the HTML page body section is loaded this function will be called.
// This function gets passed the marker XML data file name
var updateTime=30;   
var updateTime=1000*updateTime;
var markerUpdate=self.setInterval("placeMarkersOnMaps('geomarkers.xml')",updateTime);
function placeMarkersOnMaps(filename) 
{
var counter = 0;
$.ajax({
    type: "GET",
    url: filename ,
    dataType: "xml",
    success: parseXml,
              error : err
  });

}
function err (){
        alert("An Error has occurred.");
}

// Here we create an Nokia Maps within a Container.

mapContainer = document.getElementById("mapContainer");


myMap = nokia.maps.map,     
                map = new myMap.Display(mapContainer, {
                    center: [52.59, 13.3], zoomLevel: 2,
                    components: [ new myMap.component.Behavior(),
                                  new nokia.maps.map.component.ZoomBar(),
                                  new nokia.maps.map.component.Overview(),                             
                                  new nokia.maps.map.component.TypeSelector(),     
                                  new nokia.maps.map.component.ScaleBar()
                   ]
                });



  placeMarkersOnMaps('geomarkers.xml');






        function deleteMarker(coords) {
            var marker;
            for (i=0; i< map.objects.getLength(); i++) {
                if ( map.objects.get(i) instanceof nokia.maps.map.StandardMarker ) {
                    if ( coords.latitude ==  map.objects.get(i)..coords.latitude
                    && coords.longitude ==  map.objects.get(i)..coords.longitude ){
                        marker = map.objects.get(i);
                        marker.removeListener("click", function(evt) { infoBubbles.addBubble(evt.target.$html, evt.target.coordinate);}, false);;
                        map.objects.remove (marker);
                        break;
                    }
                }
            }
            return marker;
        }
function parseXml(xml)
{
    var infoBubbles = new nokia.maps.map.component.InfoBubbles();   
    map.addComponent( infoBubbles); 
    var container = new nokia.maps.map.Container();
    $(xml).find("marker").each(function(){

            //Read the name, address, latitude and longitude for each Marker
            var nme = $(this).find('name').text();
            var address = $(this).find('address').text();
            var lat = $(this).find('lat').text();
            var lng = $(this).find('lng').text();
            var zhtml = $(this).find('zhtml').text();
            var zcolor = $(this).find('zcolor').text();

            //Put each marker on the map as the data has been read.

            var markerCoords = new nokia.maps.geo.Coordinate(parseFloat(lat), parseFloat(lng));    

            var marker = new nokia.maps.map.StandardMarker(markerCoords, {text:nme, brush:{color:zcolor}, $html:zhtml});
            marker.addListener('click' ,  function(evt) { infoBubbles.addBubble(evt.target.$html, evt.target.coordinate);}, false); 
            container.objects.add(marker);      

        });
        // Add the marker container .
        map.objects.add(container);
        // Zoom into the markers.



}


</script>
  • 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-05-29T11:48:10+00:00Added an answer on May 29, 2026 at 11:48 am

    It looks like the lines intialising the infobubble are in the wrong place:

    var infoBubbles = new nokia.maps.map.component.InfoBubbles();   
        map.addComponent( infoBubbles); 
    

    Should be placed before the line

      placeMarkersOnMaps('geomarkers.xml');
    

    Otherwise you are attempting to add an info bubble component every time placeMarkersOnMaps() is run. There is usually only one.

    Also your deleteMarkers function could be replaced by

     myMap.objects.clear();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having an issue with my regex. I want to capture <% some stuff
I am having an issue with adding dynamic content through an interval. The content
Google checkout is having an issue with dynamic merchant shipping callback calculation. When customer
I am having an issue with Dynamic Binding in JSF page I am using
I'm coding a Wordpress theme and I'm having an issue displaying 5 dynamic post
I am having an issue with picking up custom data types from a drop
Having an issue with random individuals trying to access an intranet site with a
Having an issue here that I have tried everything I can think of but
The issue I'm having is issue with is I'm trying to get the paintComponent
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS

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.