Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

map marker

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

map marker

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

map marker

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.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

map marker

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

Image

thanks

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

map marker

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

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

map marker

Thank you Alena I should have seen that!

cheers

Return to “Issues”