You have two values mapped to the same Input component, it's incorrect.
You have two values mapped to the same Input component, it's incorrect.
I'm confused. Do I not need both latitude and longitude in the "inputSource" component. What's the correct mapping? Thanks Katya.
Joe,
If you want Input Source to display current address you shouldn't map latitude and longitude there. You would need to save latitude and longtitude in two localStorage variables and map address from Reverse Geocoding service to Input Source.
I'll try to explain from the beginning:
1) Create REST service with the following settings:
URL codehttp://maps.googleapis.com/maps/api/geocode/json/code
Method: GET
latlng: 40.714224,-73.961452
sensor: true
3) Go to Test tab, click test button to get response:
4) Click "Automatically Create Service Response", go to Response tab to see response structure. Should look like this:
5) Add this service to screen
6) Go to mapping
7) Create mapping for request parameter latlng, map localStorage variable latitude to parameter latlng;
8) click "Add JS" in front of "latlng" and paste the following code:
codereturn localStorage.getItem("latitude") + ',' + localStorage.getItem("longitude");/code
9) Map Response formatted_address to textbox.
10) On success Geolocation service call created service
1) Change code in JavaScript1 from
codevar mapOptions = {
zoom:7,
mapTypeId: google.maps.MapTypeId.ROADMAP,
map = new google.maps.Map(document.getElementById("directionsMap"), mapOptions);
}/code
to codevar mapOptions = {zoom:7,
mapTypeId: google.maps.MapTypeId.ROADMAP};
map = new google.maps.Map(document.getElementById("directionsMap"), mapOptions);/code
2) on Website-Page show-Run JavaScript change code$("#Chat").attr("100%", the_height);/code to code$("#Chat").attr("height", the_height);/code
3) don't worry about "Unsafe JavaScript attempt to access frame with URL", you can skip it.
Thanks Marina! It's working fairly well now. The "chat" page of my mobile website in the panel on "website" page still isn't really sizing itself correctly. Not really sure why.