Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5112 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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?

Posted

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?

Posted

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

Posted

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]

Posted

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]

Posted

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.

Posted

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]

This topic is 5112 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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