adding-multiple-location-points-on-google-map-with-appery-io-backend-services

This forum contains topics that were moved from Get Satisfaction
LuisMa Suárez Gutiérrez
Posts: 0
Joined: Mon Aug 18, 2014 9:12 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by LuisMa Suárez Gutiérrez »

hi

i wrote this ages ago.

try to create a latlnt object with plain text as a literal string something similar to this.

new google.Latlng("20.334,-134.33");

just look up the correct syntax for latlng .

I ended up creating the json object on a JS file. instead of using DB. I had maybe 45 markers

if you can tell me how you are trying to solve this I can help you. you just want to drop the markers? you don't need to calculate distance between them? o nearest one to you?

umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by umama fakher »

I just want to drop markers and show around 40 locations on map.

Many thanks for your reply.

LuisMa Suárez Gutiérrez
Posts: 0
Joined: Mon Aug 18, 2014 9:12 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by LuisMa Suárez Gutiérrez »

what i did was create an array of latlngs in code.
please forgive my lack of precise syntaxis.
var arraygps = [ new google.latlng(20.33,-103.55),new google.latlng(20.4848,l103.444), new google.latlng(20.445,-103.445)......new google.latlng(23.4005,-103.4445) ]
this is not a markers array. its an "almost marker " array . it is only the latlng objects.

voila!
you can :
a) drop markers as you create them "on the fly" with a for loop.
b) build and array of marker before dropping them

do a search on google : "google maps api drop marker"
I found this :

function initialize() {
var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var mapOptions = {
zoom: 4,
center: myLatlng
}
var map = Apperyio("themap"); //maybe it is Apperyio("themap").map
check any Appery example

var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Hello World!'
});
}

it is extremely import that before you drop markers from a fancy online DB, that you are first able to drop a regular marker from a literal string of coordinates.

I believe the actual "verb " of dropping the marker is the "map:map"argument of the var marker.

LuisMa Suárez Gutiérrez
Posts: 0
Joined: Mon Aug 18, 2014 9:12 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by LuisMa Suárez Gutiérrez »

here I'll go full on pseudo code.I'm writing from my cellphone at breakfast.

for (var k=0;k)
} );

umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by umama fakher »

Thankyou so much for your instant reply and taking time to explain. I'll try all these if I get any success I'll let you know.

Regards!

umama fakher
Posts: 0
Joined: Fri May 22, 2015 4:26 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by umama fakher »

Okay I am done with this issue. I actually take the InAppBrowser tutorial and I already have all data with my google map so I just invoked the service on the button click and it was done.

Many thanks for your suggestion and help.
Regards!

LuisMa Suárez Gutiérrez
Posts: 0
Joined: Mon Aug 18, 2014 9:12 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by LuisMa Suárez Gutiérrez »

feels good , doesn't it? I'm glad its working for you now .

Nathan Anyonge
Posts: 0
Joined: Thu Feb 26, 2015 3:05 pm

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by Nathan Anyonge »

Wondering what the right syntax to put in place of Latitude_from_DB, Longitude_from_DB aswell??

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

adding-multiple-location-points-on-google-map-with-appery-io-backend-services

Post by Illya Stepanov »

We recommend to first walk through our tutorial here: https://devcenter.appery.io/tutorials... -- basically this all works as Google Maps Geocoding API:
:: https://developers.google.com/maps/do...

Post Reply