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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:05:44+00:00 2026-06-16T21:05:44+00:00

I try to set markers on a static (non google) map based on the

  • 0

I try to set markers on a static (non google) map based on the zip code.
This is my html code:

<div ng-controller="DealerMarkerListCtrl">
    <a href="#/dealer/{{marker.id}}" class="marker" style="left:{{marker.left}}px;top:{{marker.top}}px" ng-repeat="marker in dealer|zipFilter:countryLookup"></a>
</div>  

Now I try to display all markers that are filtered by the zipcode and the country, here’s the drop down:

<input type="text" name="plz" placeholder="PLZ (z.B 80469)" class="plz" ng-model="zipCodeLookup">
<select name="drop" tabindex="1" class="drop" id="dropcountry" ng-model="countryLookup" ng-options='option.value as option.name for option in typeOptions'>
</select>

I got the following filter:

app.filter("zipFilter", function() { return function(markers, country, zip) {
    var retMarkers = [];
    for(var i = 0, len = markers.length; i < len; ++i) {
        var singleMarker = markers[i];
        if(singleMarker.land == country) {
            retMarkers.push(singleMarker);
        }
    }
    return retMarkers;
}});

The main problem is:
I got a circumcircle search where I get all zipcodes within 20 (km/miles) around the user-zipcode. This is working fine. I get a json like this, when I directly access the framework (not within the controller):

{"plz":["44787","44789","44791","44793","44795","44797","44799","44801","44803","44805","44807","44809","44866","44867","44869","44879","44892","44894","45525","45527","45529","45549"]}  

for the zipcode “45525”.

Now I need to display all markers (dealers) that are IN this array of zipcodes.
The zip parameter along with the country parameter within the filter needs to be send to the “area search” function ” files/framework/umkreis/:zip/:country” to get the zip json of the area.
Afterwards I need to check if some of the markers are in this json and filter them.

I just don’t know, how to built this stuff into my filter. Can you help me out on that? Thank you very much.

Other useful information:
Route & Service:

app.factory('dealerService', ['$resource', '$http', '$rootScope', function($resource, $http, $rootScope){
    return {
    //the resource provider interacting with the PHP backend
        api: 
        $resource('files/framework/dealer/:id', {}, {
            update: {method:'PUT'}
        }),
    }
}])

app.config(['$routeProvider', function($routeProvider) {
  $routeProvider.
      when('/dealer/:id', {templateUrl: 'files/tpl/dealer-details.html', controller: 'DealerDetailsCtrl'}).
      otherwise({redirectTo: '/dealer'});
}]); 

The route to the “Slim” framework to get the area-zipcodes is :

files/framework/umkreis/45525/DE
or
files/framework/umkreis/:zip/:country
  • 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-16T21:05:45+00:00Added an answer on June 16, 2026 at 9:05 pm

    It looks like you’re trying to update the markers on the map based on two fields in your form: “zipCodeLookup” and “countryLookup”.

    <input ... ng-model="zipCodeLookup" ... />
    <select ... ng-model="countryLookup" ... ></select>
    

    The markers are displayed in the following controller:

    <div ng-controller="DealerMarkerListCtrl"></div>  
    

    And you are using this route to gather the JSON from your PHP server

    files/framework/umkreis/:zip/:country
    

    What you need to do is specify a function in the “DealerMarkerListCtrl” controller that will take a zip code and a country, and update the dealers using the new JSON from the server.

    $scope.updateDealer = function(zip, country) { 
        $http.get('files/framework/umkreis/'+ zip + '/' + country).
        success(function(data) { 
            $scope.dealer = data; 
        }); 
    }
    

    After you have this, you can add a ng-submit to the <form> that contains the inputs that will call this function,

    <form ng-submit="updateDealer(zipCodeLookup, countryLookup)"> ... </form>
    

    Make sure that the <form> is inside of the correct controller to see the newly created function. Whenever the user submits this form, it will call your PHP server, get the JSON, and update the dealer array.

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

Sidebar

Related Questions

I have a google map set up with markers supplied via a JSON feed.
Right now I have google map code that will set a single marker on
I've set up a google maps integration with my own custom map and markers
I'm working on google map api v3 code. I saved all my markers in
try to set host in dsn of pdo like this: <?php /* Connect to
So far I have this code running: https://google-developers.appspot.com/maps/documentation/javascript/examples/places-autocomplete I have set the autocomplete to
try set logindetails to (do shell script curl google.com) on error display dialog Unable
In Google Maps when I set a center through map.setCenter(new GLatLng(28.6589, 77.2104), 13); It
Looking for a second set of eyes here... I am calling this function: customPanel(map,
I've got this piece of code where I'm trying to position a set of

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.