I gang

Mongoose Queries based on MAP API

For our REST API Server we need MongoDB Queries with Mongoose. The server response is always a JSON object. I will provide to you all of our Schemas.

You would have to write the APIs yourself by setting up a NodeJS server with ExpressJS. The queries will have to be written in Mongoose. I will provide Schemas and some Mock Data.

We have a couple of different collections.

The Apartment Collection

-----------------------------------------

Relevant fields for this description:

apartment:

address: { street: {...}, house_nr: {...}, zip: {...}, city: {...}, country: {...} }

ownder_id: {...}

distance_to_owner_office_in_km: {...}

time_by_car_to_owner_office: {...}

The Owner Collection

----------------------------------

Relevant fields for this description:

owner:

office_address: { street: {...}, house_nr: {...}, zip: {...}, city: {...}, country: {...} }

The Viewing Collection

-------------------------------------

Relevant fields for this description:

viewing

apartment_id: {...}

1st Task:

Choose a good MAP API that can give me back KM & Time (to drive by car) for 2 addresses and that is cheap or for many requests for free. Come up with some good suggestions.

If you have some good reasons for Google Maps API then so be it. But maybe you have look for some good alternatives.

This article could help you: [login to view URL]

2nd Task:

For an Apartment I need

distance_to_owner_office_in_km

and

time_by_car_to_owner_office

to be calculated based on the two addresses (Apartment Address and Owner Address).

Please put (q k x) before the title of your proposal starts. I need to see if you read my specs in detail. Thank you. Back to the description:

The API / Query should go as follows:

Case 1: if distance_to_owner_office_in_km >= XYZ_km, then

================================================

1st) Calculate how many viewings are there for this apartment ==> based on viewing.apartment_id. Let this number be ==> num_viewings

2nd) Calculation and JSON Response

[num_viewings] x [distance_to_owner_office_in_km] x 2 = [KM_travelled]

(it is x2 at the end because going back and forth)

[num_viewings] x [time_by_car_to_owner_office] x 2 = [TIME_spent]

Case 2: if distance_to_owner_office_in_km < XYZ_km, then

================================================

The same thing but instead of taking just num_viewings we group them in batches of 10.

So basically:

[KM_travelled] = round( [num_viewings] / 10 ) x [distance_to_owner_office_in_km] x 2

if( [num_viewings] % 10 != 0){

//with modulo operation we calculate if there is rest

//this means the rest is a group on its own

[KM_travelled] = [KM_travelled] + [distance_to_owner_office_in_km] x 2

}

==> the same for [time_by_car_to_owner_office] in Case 2 as well.

For all these APIs / Queries the inputs should be:

1. apartment_id

2. XYZ_km

Evner: Express JS, Javascript, MongoDB, node.js

Se mere: google api map generatot, gps vector based map, flash based map database, mongoose find all, mongoose populate, mongoose find, mongoose updateone, virtual in mongoose, mongoose document versioning, mongoose findoneandupdate, mongoose createindexes, flash based map zoom zoom, tile based map editor rpgxp, map key inputs, web based map routing, google map user inputs update, tile based map file format, xml based quiz user inputs as2, proposal title sponsorship, gps location based map android source code

Om arbejdsgiveren:
( 0 bedømmelser ) Zurich, Switzerland

Projekt ID: #19209317

Tildelt til:

mateenirshad

q k x Hi, So I read the article and among mentioned APIs, I'm a bit(least bit) familiar with Mapbox. It offers Matrix API in Navigation which calculates the distance and time based on 2 or more coordinates(lat, l Flere

$100 USD in 5 dage
(17 bedømmelser)
3.7

8 freelancere byder i gennemsnit $160 på dette job

mingxiao2008

Hi I have read your requirements carefully. I am high skilled and rich experienced in Node/express/Mongoose. If you share more details,I can start work. Best Regards.

$150 USD in 3 dage
(78 bedømmelser)
7.9
flance9

Hi there, Thank you for sharing your requirement. Hope you are doing good and having a nice day. We are a team of technocrats having 8+ years of experience in Web and Mobile design plus development and primarily Flere

$155 USD in 3 dage
(22 bedømmelser)
6.5
KashirinA

Full stack experienced developer as I m experienced developer,I can finish project very fast I m very interesting about your job I have experienced about mongoose for api part,I have experienced about curl and aj Flere

$200 USD in 3 dage
(52 bedømmelser)
6.3
MaZheng225

Hello, employer. I am very interested in your project, am so familiar with Mongoose . I have already read your description carefully Let us discuss more details via chat. Your current project is suitable for me, i Flere

$155 USD in 3 dage
(20 bedømmelser)
5.2
ghorivipul97

I am a senior web applications developer with 5+ years of proven Profile in various projects and technologies, and a total of 6+ total years of expertise in web programming. In my web development practice I used differ Flere

$222 USD in 6 dage
(15 bedømmelser)
4.5
dipeshwaglee

Hi, there - My name is Dipesh. I've read your job description and I am very interested in this project because I have good proficiency with React, Node, and MongoDB. I have 4+ years of development experience buildin Flere

$150 USD in 3 dage
(4 bedømmelser)
3.4
aweera

(q k x) Hi, I've experience in developing full stack web applications based on MongoDB Express React and Node. If you are interested, I can show my past work. Please feel free to suggest alternatives to milestones. Flere

$150 USD in 3 dage
(1 bedømmelse)
1.7