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

  • Home
  • SEARCH
  • 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 8873203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:24:22+00:00 2026-06-14T18:24:22+00:00

I have a problem: I placed markers on a map I filter data and

  • 0

I have a problem:

  1. I placed markers on a map
  2. I filter data and want to place part of these markers => I send json to server
  3. I get response, delete all markers and try to place new markers, but my gmap has gray color and nothing appears.
    here is some piece of code:

    var pins;
    
    function processFilterResult(data) {
    
        pins = data;
    
        var myLatlng = new google.maps.LatLng(pins[0].gpsLocationN, pins[0].gpsLocationW);
        var myOptions = {
            zoom : 7,
            center : myLatlng,
            mapTypeId : google.maps.MapTypeId.ROADMAP
        };
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        for(var i=0; i<pins.length; i++) {
            pins[i] = createMarkers(new google.maps.LatLng(pins[i].gpsLocationN,pins[i].gpsLocationW), pins[i]);
        }
    }
    
    function initializeGMap() {
    
        pins = convertToJSON($("#someId"));
    
        var myLatlng = new google.maps.LatLng(pins[0].gpsLocationN, pins[0].gpsLocationW);
        var myOptions = {
            zoom : 7,
            center : myLatlng,
            mapTypeId : google.maps.MapTypeId.ROADMAP
        };
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        for(var i=0; i<pins.length; i++) {
            pins[i] = createMarkers(new google.maps.LatLng(pins[i].gpsLocationN,pins[i].gpsLocationW), pins[i]);
        }
        google.maps.event.addListener(map, 'click', function(event) {
    
        });}
    

clear markers:

 function clearOverlays() {
          for (var i = 0; i < pins.length; i++ ) {
            pins[i].setMap(null);
          }
          pins = new Array();
    }

filtering:

      $.post(
                            "/mediabook/owner/filterMaps.json",
                            a,
                            function(data) {
                                clearOverlays();
                                processFilterResult(data);
                            }); 
  • 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-14T18:24:23+00:00Added an answer on June 14, 2026 at 6:24 pm

    I’m not clear your entire code though, I think your code should be like this:

    var map;
    function processFilterResult(data) 
    {
        pins = data;
        var myLatLng = new google.maps.LatLng(pins[0].gpsLocationN, pins[0].gpsLocationW); 
        map.panTo(myLatLng);
        for(var i=0; i<pins.length; i++) 
        {
            pins[i] = createMarkers(new google.maps.LatLng(pins[i].gpsLocationN,pins[i].gpsLocationW), pins[i]);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to place UItextField in UITableViewCell but I have problem. Text field don't
I need to display a google map with several markers. The problem I have
another problem. I have already placed my Jython.jar into what my computer recognizes as
I've came upon a problem regarding 2D textures placed on 2D quads. I have
Greetings, I have problem with errorPlacement, I'm trying to place the error message next
I have a problem, I described it in this place How create UIHit YesNoNull?
I'am currently working on GWTs Activity-Place implementation. Now I have found problem with the
Currently I have JavaScript that displays markers on a Google map using the Google
Problem I have a API V3 map, with a content window for each marker.
I have a problem with a map on which I've used the fitBounds map

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.