Page 1 of 1

map marker

Posted: Sun Jun 29, 2014 2:17 pm
by Michael4771079

Hi,
I am trying to set an address marker on a google map.
I have the street address in local storage "curentpropAddress" i.e " 21 slater road necastle upon tyne"

on success of a service call I tried to set property and refresh the map using this code.
Heres a screenshot of error, any ideas what Ive done wrong?

thanks

codemap js onComplete
var currentpropAddress = localStorage.getItem("currentpropAddress");
var map = Appery("googlepanelmap");
map.setProperty('Address',currentpropAddress);
marker.refresh();/code

Image


map marker

Posted: Sun Jun 29, 2014 9:55 pm
by Michael4771079

Hi folks,
need to know, is the prob to do with bugs in the panel component, the map is in a grid in a panel, or is code wrong?

please answer if you can.

thanks alot


map marker

Posted: Mon Jun 30, 2014 2:37 am
by Yurii Orishchuk

Hi Michael.

Please use following code:

pre

//Note "googlemap_24" is your google maps component name.
var map = Appery('googlemap_24');
map.options['address'] = "Address you need";
map.refresh();

/pre

Regards.


map marker

Posted: Mon Jun 30, 2014 7:32 am
by Michael4771079

I dont understand,
I am trying to get the address from local storage, and my map is called "googlepanelmap"

Image

thanks


map marker

Posted: Mon Jun 30, 2014 9:13 am
by Alena Prykhodko

Just transform code above to fulfil your requirements.

This code updates Addreess field of the map component property:
Should be:

pre
var map = Appery('googlepanelmap');
map.options['address'] = localStorage.getItem("currentpropAddress");
map.refresh();
/pre


map marker

Posted: Mon Jun 30, 2014 11:44 am
by Michael4771079

Thank you Alena I should have seen that!

cheers