Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GetURLasText is different then webview?

Featured Replies

Hi,

I am using the Get URL as Text function to get the XML for the following URL

http://maps.googleapis.com/maps/api/geocode/xml?address=Gilles+van+Ledenberchstraat+27,1052TX,+Amsterdam,+Nederland&sensor=false

the strange thing is that if I use this URL in a webview or browser I get the geocoding for the

street_address, but if I use the ScriptMaster plugin I get the coding for the postal_code!

What is going wrong here?

Best regards,

Ruben van den Boogaard

Infomatics Software

Can you post what your result is? I'm getting exactly the same thing in the web viewer, in a browser, and from the get url as text function when I try this.

  • Author

Hi David,

I get from the webview:

OK street_address Gillis van Ledenberchstraat 27, 1052 Amsterdam, Nederland 27 27 street_number Gillis van Ledenberchstraat Gillis van Ledenberchstraat route Frederik Hendrikbuurt Frederik Hendrikbuurt sublocality political Westerpark Westerpark sublocality political Amsterdam Amsterdam locality political Amsterdam Amsterdam administrative_area_level_2 political Noord-Holland NH administrative_area_level_1 political Nederland NL country political 1052 1052 postal_code 52.3774102 4.8725948 RANGE_INTERPOLATED 52.3742647 4.8694381 52.3805600 4.8757334 52.3774102 4.8725767 52.3774145 4.8725948 true

and from the plugin:

<?xml version="1.0" encoding="UTF-8"?>

OK

postal_code

1052 TX Amsterdam, The Netherlands

1052 TX

1052 TX

postal_code

Frederik Hendrikbuurt

Frederik Hendrikbuurt

....

I'll send you the sample file backchannel.

Best regards,

Ruben van den Boogaard

Infomatics Software

The text field is showing you the raw xml, which is the source document for what safari/the web viewer is rendering and displaying for you. As far as i can tell the data being displayed by safari is the same as the xml being captured by the plugin.

Is there something I'm not catching here, or were you just expecting to get the text that your web viewer is rendering, rather than the raw text from the URL?

I get from the webview:

OK [color:red]street_address Gillis van Ledenberchstraat 27, 1052 Amsterdam, Nederland 27 27 street_number Gillis van Ledenberchstraat Gillis van Ledenberchstraat route Frederik Hendrikbuurt Frederik Hendrikbuurt sublocality political Westerpark Westerpark sublocality political Amsterdam Amsterdam locality political Amsterdam Amsterdam administrative_area_level_2 political Noord-Holland NH administrative_area_level_1 political Nederland NL country political 1052 1052 postal_code 52.3774102 4.8725948 RANGE_INTERPOLATED 52.3742647 4.8694381 52.3805600 4.8757334 52.3774102 4.8725767 52.3774145 4.8725948 true

I cannot reproduce your issue in the web viewer. I get:

OK [color:red]postal_code 1052 TX Amsterdam, The Netherlands 1052 TX 1052 TX postal_code Frederik Hendrikbuurt Frederik Hendrikbuurt sublocality political Westerpark Westerpark sublocality political Amsterdam Amsterdam locality political Amsterdam Amsterdam administrative_area_level_2 political Noord-Holland NH administrative_area_level_1 political The Netherlands NL country political 52.3775357 4.8728161 APPROXIMATE 52.3743881 4.8696685 52.3806833 4.8759637 true

Are you sure you have the same URL?

  • Author

I cannot reproduce your issue in the web viewer. I get:

OK [color:red]postal_code 1052 TX Amsterdam, The Netherlands 1052 TX 1052 TX postal_code Frederik Hendrikbuurt Frederik Hendrikbuurt sublocality political Westerpark Westerpark sublocality political Amsterdam Amsterdam locality political Amsterdam Amsterdam administrative_area_level_2 political Noord-Holland NH administrative_area_level_1 political The Netherlands NL country political 52.3775357 4.8728161 APPROXIMATE 52.3743881 4.8696685 52.3806833 4.8759637 true

Are you sure you have the same URL?

Attached is my sample file with the screenshot. I have tested it on my MBP 10.6.5 using FMA 9 and 11 and on an 10.6.5 iMac with FMA 8.5 and a 10.4.11 Mac mini using FPA 8.5 and they all show the

street_address in the webview and the postal_code as a result of the GETURLasText command.

I also tried the url in FireFox and that also gave the street_address ??

It is like the browser (webview) does something to the request and gets a different result so I checked it with HTTPScoop, and see that I get 1.8kB return when I use GetURL and 2.32kB using the webview,

I also see that the User Agent is different, Java 1.60_22 vs Mozilla 5.0 and that the webview accepts more formats including xml than the GetURL

Maybe there is the answer somewhere?

Best regards,

Ruben van den Boogaard

Infomatics Software

[email protected]

Archief.zip

Is it possible that your browser is redirecting you to a different URL, Infomatics?

  • Author

Hm...

Do you get the same result with the attached file as I do?

I get, street_address left and route right, as I would expect.

Best regards,

Ruben van den Boogaard

Infomatics Software

[email protected]

Schermafbeelding 2010-12-06 om 17.02.45.png.3dd84bfae4841b32f023e4f044ce6704.png

  • Author

Is it possible that your browser is redirecting you to a different URL, Infomatics?

I can not imagine that, I have the same result on Safari and Firefox and on different machines

even on different networks.

Is it possible that Google returns different results when a different user agent is used?

Best regards,

Ruben van den Boogaard

Infomatics Software

[email protected]

I get, street_address left and route right, as I would expect.

Why would you expect this - what exactly is the difference?

  • Author

Why would you expect this - what exactly is the difference?

The URL left is my original URL which gives a street_address using the webview and postal_code address using the GetURLasText

(see the screenshot) what do you get?, it seems like you say that you get the postal_code in both instances?

The URL on the right is a different address where I get on both sides the postal_code, so it seems that in certain conditions

there is a difference in result between the webview and as returned from the GetURLasText command, that is why I posted the

question.

Best regards,

Ruben van den Boogaard

Infomatics Software

[email protected]

As shown in my screenshot, I get "postal code" on the left and "route" on the right.

The URL on the right is a different address where I get on both sides the postal_code

Your screenshot shows "street address" on the left and "route" on the right - not "postal code".

I don't know how to explain these differences when using the SAME browser and apparently similar requests. It seems to me that this question would be better answered by the Google team.

  • Author

As shown in my screenshot, I get "postal code" on the left and "route" on the right.

Your screenshot shows "street address" on the left and "route" on the right - not "postal code".

I don't know how to explain these differences when using the SAME browser and apparently similar requests. It seems to me that this question would be better answered by the Google team.

OK i'll see if I can find the answer else.

Thank you for your help!

Best regards,

Ruben van den Boogaard

Infomatics Software

[email protected]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.