[OpenLayers-Users] KML and area colorization
Andreas Hocevar
ahocevar at opengeo.org
Thu Jun 18 06:35:20 EDT 2009
VIDAUD Romain wrote:
> Hi(again)
> You are right because when I directly link to OL site with <script type="text/javascript" src="http://www.openlayers.org/dev/OpenLayers.js"></script> instead of having the lib inside my project, it works.. I'll wait the RC to become "downloadable" as final release to integrate as part of my project. Thanks much again,
> Romain
>
The rc is downloadable already. You can download any release candidate
and release from http://openlayers.org/download/
Regards,
Andreas.
>
>
> -----Message d'origine-----
> De : andreas.hocevar at gmail.com [mailto:andreas.hocevar at gmail.com] De la part de Andreas Hocevar
> Envoyé : mercredi 17 juin 2009 18:12
> À : VIDAUD Romain
> Cc : users at openlayers.org
> Objet : Re: [OpenLayers-Users] KML and area colorization
>
> Hi Romain,
>
> I think there is something else wrong with your code. What makes me
> suspicious is that you saw anything at all, because using vector
> behaviors requires not only a protocol, but at least one strategy.
>
> Looking at your screenshot, it also seems that you have not installed
> OpenLayers right (images are missing). You do not just need to update
> OpenLayers.js, but also the img and theme folders.
>
> Regards,
> Andreas.
>
> On Wed, Jun 17, 2009 at 5:28 PM, VIDAUD
> Romain<RVIDAUD at atmo-rhonealpes.org> wrote:
>
>> Hi,
>>
>> Unfortunately i had tested the strategie parameter (as shown in examples on the OL website) and it does not help.. why http provided KML file would not react the same in IE and FF ?
>>
>> Romain
>>
>> -----Message d'origine-----
>> De : andreas.hocevar at gmail.com [mailto:andreas.hocevar at gmail.com] De la part de Andreas Hocevar
>> Envoyé : mercredi 17 juin 2009 16:32
>> À : VIDAUD Romain
>> Cc : users at openlayers.org
>> Objet : Re: [OpenLayers-Users] KML and area colorization
>>
>> Hi,
>>
>> On Wed, Jun 17, 2009 at 3:36 PM, VIDAUD
>> Romain<RVIDAUD at atmo-rhonealpes.org> wrote:
>>
>>> When I make the sample page you gave deserialize my kml (copy paste content of kml file) everything is ok. When I use a "Layer.Vector" version, the zone is displayed and colorized but not on a good geographic location (under IE7) ..
>>>
>>> The script is :
>>>
>>> new OpenLayers.Layer.Vector("KML", {
>>> protocol: new OpenLayers.Protocol.HTTP({
>>> url: kmladress,
>>> format: new OpenLayers.Format.KML({
>>> extractStyles: true,
>>> extractAttributes: true
>>> })
>>> })
>>> });
>>>
>> You should configure a strategy with your layer:
>>
>> new OpenLayers.Layer.Vector("KML", {
>> protocol: new OpenLayers.Protocol.HTTP({
>> url: kmladress,
>> format: new OpenLayers.Format.KML({
>> extractStyles: true,
>> extractAttributes: true
>> })
>> }),
>> strategies: [new OpenLayers.Strategy.Fixed()]
>> });
>>
>> Intersting how your application works at all without it, but the
>> strategy will definitely take care of reprojecting your features to
>> the map's projection.
>>
>> Regards,
>> Andreas.
>>
>>
>>> And I get as a result what can be viewed at
>>> http://www4.atmo-rhonealpes.org/site/OL_httpKML_layer.PNG (can give an real sample url cause it's on developpement server for now)
>>>
>>> Thanks,
>>>
>>> Romain
>>>
>>>
>>>
>>> -----Message d'origine-----
>>> De : andreas.hocevar at gmail.com [mailto:andreas.hocevar at gmail.com] De la part de Andreas Hocevar Envoyé : mardi 16 juin 2009 16:23 À : VIDAUD Romain Cc : users at openlayers.org Objet : Re: [OpenLayers-Users] KML and area colorization
>>>
>>> Hi,
>>>
>>> this issue is fixed in OpenLayers 2.8 (currently available as 2.8-rc6 under http://www.openlayers.org/api/2.8-rc6/OpenLayers.js).
>>>
>>> To verify, go to
>>> http://www.openlayers.org/dev/examples/vector-formats.html, select "KML" as format, paste the contents of your kml there, and hit "add feature".
>>>
>>> Regards,
>>> Andreas.
>>>
>>> On Mon, Jun 15, 2009 at 6:02 PM, VIDAUD
>>> Romain<RVIDAUD at atmo-rhonealpes.org> wrote:
>>>
>>>> Hello,
>>>>
>>>>
>>>>
>>>> I have a KML problem under IE7. I am drawing areas providing OL a KML
>>>> file generated by my webserver.
>>>>
>>>> Under Chrome and FF (and google earth when I download it) all is
>>>> correctly drawn and colorized, but with IE7, areas doesn't always have
>>>> their correct color (left white instead). Is there a known issue about it ?
>>>>
>>>> (use example can be viewed at
>>>> http://www4.atmo-rhonealpes.org/Site/Map/ChargerModule/161505/194/0/1)
>>>>
>>>> (KML file address is:
>>>> http://www4.atmo-rhonealpes.org/Site/Indice/KML/IndiceConfigPREVISIO/1
>>>> 5-06-2009/all)
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Romain VIDAUD
>>>>
>>>> Webmaster
>>>>
>>>>
>>>>
>>>> Atmo-RhôneAlpes
>>>>
>>>> Groupement d'Intérêt Economique d'Associations
>>>>
>>>> Agréées pour la Surveillance de la Qualité de l'Air
>>>>
>>>> AMPASEL - ASCOPARG - ATMO Drôme Ardèche - COPARLY - SUP'AIR
>>>>
>>>> Standard : 04 38 49 92 20 - contact at atmo-rhonealpes.org
>>>>
>>>> Info air: www.atmo-rhonealpes.org - 0810 800 710 (N° azur - Prix d'un
>>>> appel
>>>> local)
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openlayers.org
>>>> http://openlayers.org/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>
>>> --
>>> Andreas Hocevar
>>> OpenGeo - http://opengeo.org/
>>> Expert service straight from the developers.
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>
>> --
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>
>
>
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list